mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 05:36:12 +00:00
GOB: work around an infinite loop issue in Adibou 2 "change CD" screen
It seems that this bug is harmless in the original game because it requires a certain combination of files to be present in the CD, which is not the case in practice in Adibou2 CDs ; but it exists for us because our fake "CD" search includes all files in game directory and sub-directories.
This commit is contained in:
parent
709df52d48
commit
9beca4c206
@ -1408,7 +1408,15 @@ void Inter_v7::o7_checkData(OpFuncParams ¶ms) {
|
||||
file.c_str(), size);
|
||||
|
||||
WRITE_VAR_OFFSET(varOff, handle);
|
||||
WRITE_VAR(16, (uint32) size);
|
||||
if (_vm->getGameType() == kGameTypeAdibou2
|
||||
&&
|
||||
_vm->isCurrentTot("BE_CD.TOT")) {
|
||||
// WORKAROUND: in script BE_CD.TOT of Adibou 2, o7_checkData() can be called in the "leave" callback of a hotspot.
|
||||
// This corrupts the "current hotspot" variable, which is also VAR(16) (!), and lead to an infinite loop.
|
||||
// We skip writing the file size into VAR(16) here as a workarond (the value is not used anyway).
|
||||
}
|
||||
else
|
||||
WRITE_VAR(16, (uint32) size);
|
||||
}
|
||||
|
||||
void Inter_v7::o7_readData(OpFuncParams ¶ms) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user