mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
This allows ScummVM to run pre-Dig/FT SCUMM games again when compiled with
GCC 4.0, at least for me. I'm not enough of a language lawyer to say for certain whether the old code was really undefined, but it's a simple enough change that shouldn't possibly do any harm. svn-id: r18507
This commit is contained in:
parent
fc4c06309c
commit
e23e1aa1f6
@ -1446,7 +1446,15 @@ void ScummEngine_v5::o5_equalZero() {
|
||||
}
|
||||
|
||||
void ScummEngine_v5::o5_jumpRelative() {
|
||||
_scriptPointer += (int16)fetchScriptWord();
|
||||
// Note that calling fetchScriptWord() will also modify _scriptPointer,
|
||||
// so *don't* do this: _scriptPointer += (int16)fetchScriptWord();
|
||||
//
|
||||
// I'm not enough of a language lawyer to say for certain that this is
|
||||
// undefined, but I do know that GCC 4.0 doesn't think it means what
|
||||
// we want it to mean.
|
||||
|
||||
int16 offset = (int16)fetchScriptWord();
|
||||
_scriptPointer += offset;
|
||||
}
|
||||
|
||||
void ScummEngine_v5::o5_lights() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user