diff options
author | Tobia Tesan | 2014-09-09 17:33:21 +0200 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:47 +0200 |
commit | 3cef639f911264547b08428110e33a3d5a595fee (patch) | |
tree | 2379b6081742639fbfa7f708d3e66a5936d97720 | |
parent | d5ed8c29f1f97519bd72aec8585edf04ac46181f (diff) | |
download | scummvm-rg350-3cef639f911264547b08428110e33a3d5a595fee.tar.gz scummvm-rg350-3cef639f911264547b08428110e33a3d5a595fee.tar.bz2 scummvm-rg350-3cef639f911264547b08428110e33a3d5a595fee.zip |
WINTERMUTE: new char[str.size()+1] in BaseStringTable::expand
This makes room for the EOS char.
-rw-r--r-- | engines/wintermute/base/base_string_table.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp index bcdd7cb861..4c750ebc93 100644 --- a/engines/wintermute/base/base_string_table.cpp +++ b/engines/wintermute/base/base_string_table.cpp @@ -149,7 +149,7 @@ void BaseStringTable::expand(char **str) const { ////////////////////////////////////////////////////////////////////////// void BaseStringTable::expand(Common::String &str) const { - char *tmp = new char[str.size()]; + char *tmp = new char[str.size()+1]; strcpy(tmp, str.c_str()); expand(&tmp); str = tmp; |