[Scummvm-git-logs] scummvm master -> 8657bee6bfe99464e004f4ab0b775761a7897144
dwatteau
noreply at scummvm.org
Fri Aug 15 19:27:56 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b039c872c7 GOT: Fix non-portable memset() size arguments
8657bee6bf HYPNO: Fix non-portable memset() size arguments
Commit: b039c872c714b11537326b2925b2df8eab2553b9
https://github.com/scummvm/scummvm/commit/b039c872c714b11537326b2925b2df8eab2553b9
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-08-15T21:27:29+02:00
Commit Message:
GOT: Fix non-portable memset() size arguments
Found by GCC with -Wmemset-elt-size on OSXPPC, where sizeof(bool) == 4.
Changed paths:
engines/got/game/boss2.cpp
engines/got/game/boss3.cpp
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index b1183996433..fa9c9e8c7b2 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -178,7 +178,7 @@ void boss2CheckHit(Actor *actor) {
_G(actor[3])._i1 = 1;
_G(actor[3])._i2 = 0;
- memset(expf, 0, 60);
+ memset(expf, 0, sizeof(expf));
for (int rep = 7; rep < MAX_ACTORS; rep++) {
if (_G(actor[rep])._active)
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index cb22c68eebc..58cd3ad8b64 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -563,7 +563,7 @@ void endingScreen() {
musicPlay(6, true);
- memset(explosionFlag, 0, 4 * 8);
+ memset(explosionFlag, 0, sizeof(explosionFlag));
_G(endGame) = 1;
_G(explosionRow) = 0;
@@ -652,7 +652,7 @@ int endGameMovement() {
_G(explosionRow++);
explosionCounter++;
if (explosionCounter > 3) {
- memset(explosionFlag, 0, 32);
+ memset(explosionFlag, 0, sizeof(explosionFlag));
}
}
Commit: 8657bee6bfe99464e004f4ab0b775761a7897144
https://github.com/scummvm/scummvm/commit/8657bee6bfe99464e004f4ab0b775761a7897144
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-08-15T21:27:29+02:00
Commit Message:
HYPNO: Fix non-portable memset() size arguments
Found by GCC with -Wmemset-elt-size on OSXPPC, where sizeof(bool) == 4.
Changed paths:
engines/hypno/spider/hard.cpp
diff --git a/engines/hypno/spider/hard.cpp b/engines/hypno/spider/hard.cpp
index 0ce1e1c6300..30168600c3f 100644
--- a/engines/hypno/spider/hard.cpp
+++ b/engines/hypno/spider/hard.cpp
@@ -218,7 +218,7 @@ void SpiderEngine::checkMixture(Code *code) {
if (ingredients[0]) {
MVideo video("cine/blcs005s.smk", Common::Point(0, 0), false, true, false);
runIntro(video);
- memset(ingredients, 0, 7);
+ memset(ingredients, 0, sizeof(ingredients));
return;
}
@@ -235,7 +235,7 @@ void SpiderEngine::checkMixture(Code *code) {
if (!ingredients[i]) {
MVideo video("cine/blcs005s.smk", Common::Point(0, 0), false, true, false);
runIntro(video);
- memset(ingredients, 0, 7);
+ memset(ingredients, 0, sizeof(ingredients));
return;
}
}
More information about the Scummvm-git-logs
mailing list