diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/string.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index bbbb7d2a06..a94d4b8303 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1045,7 +1045,8 @@ void ScummEngine::drawString(int a, const byte *msg) { while (ltext[ll] == 0xFF) { ll += 4; } - byte lenbuf[270] = {0}; + byte lenbuf[270]; + memset(lenbuf, 0, sizeof(lenbuf)); int pos = ll; while (ltext[pos]) { if ((ltext[pos] == 0xFF || (_game.version <= 6 && ltext[pos] == 0xFE)) && ltext[pos+1] == 8) { @@ -1104,7 +1105,8 @@ void ScummEngine::drawString(int a, const byte *msg) { while (ltext[ll] == 0xFF) { ll += 4; } - byte lenbuf[270] = {0}; + byte lenbuf[270]; + memset(lenbuf, 0, sizeof(lenbuf)); memcpy(lenbuf, ltext, ll); int u = ll; while (ltext[u]) { @@ -1753,4 +1755,4 @@ void ScummEngine::translateText(const byte *text, byte *trans_buff) { memcpy(trans_buff, text, resStrLen(text) + 1); } -} // End of namespace Scumm
\ No newline at end of file +} // End of namespace Scumm |