[Scummvm-cvs-logs] CVS: scummvm/scumm player_v2.cpp,2.21,2.22
Jamieson Christian
jamieson630 at users.sourceforge.net
Fri Aug 15 18:15:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20197/scummvm/scumm
Modified Files:
player_v2.cpp
Log Message:
Fix for Bug [788531] Indy3VGA - Access violation with PC Speaker "travel" music
Checked for OOB channel clear command. The "travel" music
in question seems to try to clear channel 4 when there are
only channels 0-3. Now we check and bail if OOB.
Perhaps this isn't quite the correct thing to do. Would
channel 4 be significant, as in perhaps "clear ALL channels"?
Hoenicke should answer this one.
Index: player_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/player_v2.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- player_v2.cpp 14 Aug 2003 19:41:39 -0000 2.21
+++ player_v2.cpp 15 Aug 2003 07:10:30 -0000 2.22
@@ -589,10 +589,15 @@
break;
case 0xfd: // clear other channel
- value = READ_LE_UINT16 (script_ptr);
- debug(9, "clear channel %d", value/50);
+ value = READ_LE_UINT16 (script_ptr) / sizeof (ChannelInfo);
+ debug(9, "clear channel %d", value);
script_ptr += 2;
- channel = &_channels[value / sizeof(ChannelInfo)];
+ // In Indy3, when traveling to Venice a command is
+ // issued to clear channel 4, which is OOB. So, we
+ // check first.
+ if (value >= ARRAYSIZE (_channels))
+ break;
+ channel = &_channels[value];
// fall through
case 0xfa: // clear current channel
More information about the Scummvm-git-logs
mailing list