diff options
-rw-r--r-- | src/worldmap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 7bfa461..d254226 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -157,7 +157,7 @@ void dScNewerWorldMap_c::StartLevel(LevelInfo_Entry *entry) { }
void dScNewerWorldMap_c::SetTitle(const char *text) {
- unsigned short conv_buf[0x1FF];
+ unsigned short conv_buf[0x200];
int length = strlen(text);
if (length > 0x1FF)
length = 0x1FF;
@@ -165,6 +165,7 @@ void dScNewerWorldMap_c::SetTitle(const char *text) { for (int i = 0; i < length; i++) {
conv_buf[i] = text[i];
}
+ conv_buf[length] = 0;
void *textBox = EmbeddedLayout_FindTextBoxByName(this->layout, "ScreenTitle");
TextBox_SetString(textBox, conv_buf, 0);
|