aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-01-31 07:15:53 +0000
committerPaweł Kołodziejski2003-01-31 07:15:53 +0000
commit5ff4e98d757b3989133f7381fb5f05f9cb26ebbb (patch)
treee6f14f8a5156762f5469a0c6c0e2188001c67c84 /scumm/string.cpp
parentee047a0fa867d5b9cde911298d59d65e0f4a22e0 (diff)
downloadscummvm-rg350-5ff4e98d757b3989133f7381fb5f05f9cb26ebbb.tar.gz
scummvm-rg350-5ff4e98d757b3989133f7381fb5f05f9cb26ebbb.tar.bz2
scummvm-rg350-5ff4e98d757b3989133f7381fb5f05f9cb26ebbb.zip
increased buffer
svn-id: r6580
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 3666c99cd7..6ea9a0362b 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -836,7 +836,7 @@ void Scumm::loadLanguageBundle() {
void Scumm::translateText(byte *text, byte *trans_buff) {
if ((_existLanguageFile == true) && (text[0] == '/') && (text[1] != ' ')) {
- char name[20], tmp[200], tmp2[20], num_s[20], number[4];
+ char name[20], tmp[500], tmp2[20], num_s[20], number[4];
int32 num, l, j, k, r, pos;
char enc;
@@ -857,7 +857,8 @@ void Scumm::translateText(byte *text, byte *trans_buff) {
l = 0;
do {
tmp[l++] = buf[pos++];
- } while((buf[pos] != 0) && (buf[pos] != 0x0d) && (buf[pos + 1] != 0x0a) && (l < 199));
+ assert(l < 499);
+ } while((buf[pos] != 0) && (buf[pos] != 0x0d) && (buf[pos + 1] != 0x0a));
tmp[l] = 0;
pos += 2;
l = 0;