From 2e2aceac86ede364c5a5c98190b82ca70a96c660 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 8 May 2011 03:08:10 +0200 Subject: oops, a bug in SetTitle --- src/worldmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3