aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorBLooperZ2019-12-30 22:31:35 +0200
committerEugene Sandulenko2020-01-01 00:31:21 +0100
commite411a539cbc8de8758ed9294fd151b536402c309 (patch)
tree5fa7c79d6566e936bd39f05b7e82b2b379a33ff6 /engines/scumm
parent2105313d8b074e0556187dfeb6d5e1f497bc0b7d (diff)
downloadscummvm-rg350-e411a539cbc8de8758ed9294fd151b536402c309.tar.gz
scummvm-rg350-e411a539cbc8de8758ed9294fd151b536402c309.tar.bz2
scummvm-rg350-e411a539cbc8de8758ed9294fd151b536402c309.zip
SCUMM: use memset for initialization
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/string.cpp8
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