mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-12-22 16:30:23 +00:00
Fix crash in get_level_name()
This commit is contained in:
parent
988c75d621
commit
2fea65b8ef
1 changed files with 2 additions and 3 deletions
|
@ -106,7 +106,7 @@ const char* get_level_name(s16 courseNum, s16 levelNum, s16 areaIndex) {
|
|||
}
|
||||
|
||||
// If we are in in Course 0 we are in the castle which doesn't have a string
|
||||
if (courseNum) {
|
||||
if (courseNum && courseNum > 0 && courseNum < 27) {
|
||||
void** courseNameTbl;
|
||||
|
||||
#ifndef VERSION_EU
|
||||
|
@ -127,8 +127,7 @@ const char* get_level_name(s16 courseNum, s16 levelNum, s16 areaIndex) {
|
|||
u8* courseName = segmented_to_virtual(courseNameTbl[courseNum - 1]);
|
||||
|
||||
convert_string(&courseName[3], stage);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
strcpy(stage, "Peach's Castle");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue