mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 09:10:29 +00:00
SCUMM: use memset for initialization
This commit is contained in:
parent
2105313d8b
commit
e411a539cb
@ -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
|
||||
} // End of namespace Scumm
|
||||
|
Loading…
Reference in New Issue
Block a user