[Scummvm-tracker] [ScummVM] #10665: Lands of Lore 1 bug which leads to a crash.
digitall
trac at scummvm.org
Mon Oct 1 08:14:53 CEST 2018
#10665: Lands of Lore 1 bug which leads to a crash.
----------------------------+--------------------------
Reporter: Traveler84 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: Kyra
Resolution: | Keywords:
Game: Lands of Lore |
----------------------------+--------------------------
Comment (by digitall):
It appears that while the size of the sound index is 1000
(_soundIndexSize) bytes, and thus 500 16 bit values, the second half of
these are not initialised properly or maybe only bytes 499/500. There are
several other places in the KYRA engine which refer to "Unknown 500 bytes"
so maybe the same.
The following patch fixes this issue in LoL:
{{{
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 51239bc444..ec48dc8c30 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -161,7 +161,7 @@ void LoLEngine::snd_playSoundEffect(int track, int
volume) {
return;
_lastSfxTrack = track;
- if (track == -1 || track >= _ingameSoundIndexSize)
+ if (track == -1 || track >= (_ingameSoundIndexSize - 500) / 2)
return;
volume &= 0xFF;
}}}
However, not sure if this is the right solution... Need to check with a
KYRA engine developer.
--
Ticket URL: <https://bugs.scummvm.org/ticket/10665#comment:4>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list