diff options
author | Treeki <treeki@gmail.com> | 2011-05-08 03:08:10 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-05-08 03:08:10 +0200 |
commit | 2e2aceac86ede364c5a5c98190b82ca70a96c660 (patch) | |
tree | 9e37d271e1276e8d852ad3f0fd3812bbb959b3cd /src/worldmap.cpp | |
parent | 92541f002c9db098323bfdc544b18a89ae5da61c (diff) | |
download | kamek-2e2aceac86ede364c5a5c98190b82ca70a96c660.tar.gz kamek-2e2aceac86ede364c5a5c98190b82ca70a96c660.zip |
oops, a bug in SetTitle
Diffstat (limited to '')
-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);
|