[Scummvm-git-logs] scummvm master -> cf1808fa7dea552db3723da9874a2a48a7a2c8f9

bluegr noreply at scummvm.org
Sun Dec 15 19:31:57 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:
cf1808fa7d SCI: fix kernel sub function mapping for certain builds


Commit: cf1808fa7dea552db3723da9874a2a48a7a2c8f9
    https://github.com/scummvm/scummvm/commit/cf1808fa7dea552db3723da9874a2a48a7a2c8f9
Author: athrxx (athrxx at scummvm.org)
Date: 2024-12-15T21:31:54+02:00

Commit Message:
SCI: fix kernel sub function mapping for certain builds

I had issues to run any SCI1 game with MSVC ASan builds.They
always failed to start up with a 'DoSoundMasterVolume: no
previous signatures' error. When I recently had that issue (which
I quickly discussed with digitall on discord) I got it fixed by
simply doing a full rebuild. But not this time. So I looked into it
deeper. And I find it quite surprising that it usually works in 99,9%
of all cases, since it does a comparison of two pointers that are
meant to point to different strings. In the kDoSound_subops
table, each entry gets its own string. My only explanation is that
these string repetitions get optimized away (but apparently not
or not always for the MSVC ASan build). I have replaced it with
a strcmp which seems to work fine.

Changed paths:
    engines/sci/engine/kernel.cpp


diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 600d0e95239..4915afce3d4 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -681,7 +681,7 @@ void Kernel::mapFunctions(GameFeatures *features) {
 									while (kernelSubLeft) {
 										kernelSubLeft--;
 										kernelSubMapBack--;
-										if (kernelSubMapBack->name == kernelSubMap->name) {
+										if (!strcmp(kernelSubMapBack->name, kernelSubMap->name)) {
 											if (kernelSubMapBack->signature) {
 												subFunctions[subId].signature = parseKernelSignature(kernelSubMap->name, kernelSubMapBack->signature);
 												break;




More information about the Scummvm-git-logs mailing list