Skip to content

Commit c04e85f

Browse files
committed
Fix the game crashing when warping to rooms that have names with 8 or more characters
The crash occurred in reloadRoomMain, in which the last byte of NewMap was set to NULL, which would overwrite the last character in the name.
1 parent 2cf055b commit c04e85f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ttyd-tools/rel/include/global.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,8 @@ struct ReloadRoomStruct
708708
{
709709
bool ManuallyReloadingRoom;
710710
bool SystemLevelShouldBeLowered;
711-
char NewBero[16]; // Not NULL terminated
712-
char NewMap[8]; // Not NULL terminated
711+
char NewBero[17]; // 16 bytes for NewBero, one byte for NULL
712+
char NewMap[9]; // 8 bytes for NewMap, one byte for NULL
713713
};
714714

715715
struct SpawnItems

ttyd-tools/rel/source/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace mod {
77

8-
const char *VersionNumber = "v3.0.55d";
8+
const char *VersionNumber = "v3.0.54";
99

1010
const char *RootLines[] =
1111
{

0 commit comments

Comments
 (0)