diff options
author | Torbjörn Andersson | 2003-12-28 15:50:10 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-12-28 15:50:10 +0000 |
commit | 584f76ada6135b145d75247c0092001aac356252 (patch) | |
tree | 3d83a073900cc0d0015ec2215f340314f1e9b27f | |
parent | 67159d453998c3aae395f4fba943111884ea03e7 (diff) | |
download | scummvm-rg350-584f76ada6135b145d75247c0092001aac356252.tar.gz scummvm-rg350-584f76ada6135b145d75247c0092001aac356252.tar.bz2 scummvm-rg350-584f76ada6135b145d75247c0092001aac356252.zip |
This could be wrong so feel free to revert, but it does seem to fix crashes
in the Mine Road sequence of Full Throttle for me.
The crashes were always in proc64(), with 'en' being some ridiculously
large value. The function, as it was written, did not make any sense to me
so I rewrote it with the assumption that it's there to remove the "en"th
element of the _val216d[] (remaining enemies?) array.
I don't know how well it will work from proc63() if there's more than one
element to remove - at least if the elements to remove are neighbours - but
maybe that case never happens.
svn-id: r11999
-rw-r--r-- | scumm/smush/insane.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scumm/smush/insane.cpp b/scumm/smush/insane.cpp index f2f78a7afa..060520c57d 100644 --- a/scumm/smush/insane.cpp +++ b/scumm/smush/insane.cpp @@ -7780,12 +7780,10 @@ void Insane::proc63(void) { } void Insane::proc64(int32 enemy1) { - int en = _val215d; + _val215d--; - for (en = _val215d; enemy1 < en; en++) + for (int en = enemy1; en < _val215d; en++) _val216d[en] = _val216d[en + 1]; - - _val215d = en - 1; } void Insane::iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12, |