[Scummvm-git-logs] scummvm master -> eb375c897b886df32b7914666686dd6246bca355
eriktorbjorn
noreply at scummvm.org
Sat Jul 27 08:50:39 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
eb375c897b SCUMM: Silence GCC calloc() warnings
Commit: eb375c897b886df32b7914666686dd6246bca355
https://github.com/scummvm/scummvm/commit/eb375c897b886df32b7914666686dd6246bca355
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2024-07-27T10:49:30+02:00
Commit Message:
SCUMM: Silence GCC calloc() warnings
It shouldn't matter, but it's the second parameter to calloc() that's
the element size, not the first one.
Changed paths:
engines/scumm/string.cpp
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index d107b447f42..e3a4b59a415 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -642,9 +642,9 @@ void ScummEngine::fakeBidiString(byte *ltext, bool ignoreVerb, int ltextSize) co
byte *current = text;
int32 bufferSize = 384;
- byte * const buff = (byte *)calloc(sizeof(byte), bufferSize);
+ byte * const buff = (byte *)calloc(bufferSize, sizeof(byte));
assert(buff);
- byte * const stack = (byte *)calloc(sizeof(byte), bufferSize);
+ byte * const stack = (byte *)calloc(bufferSize, sizeof(byte));
assert(stack);
while (1) {
More information about the Scummvm-git-logs
mailing list