[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.62,1.63
Max Horn
fingolfin at users.sourceforge.net
Fri Nov 8 14:07:02 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv6767/simon
Modified Files:
simon.cpp
Log Message:
fixed warning; fixed array out of bounds access
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- simon.cpp 8 Nov 2002 13:38:25 -0000 1.62
+++ simon.cpp 8 Nov 2002 22:06:03 -0000 1.63
@@ -3276,7 +3276,7 @@
void SimonState::readSfxFile(const char *filename)
{
- uint num;
+ uint num = 0;
if (_game == GAME_SIMON1WIN) { /* simon 1 win */
uint32 size;
@@ -3308,7 +3308,7 @@
int set;
uint32 offs;
- int i;
+ uint i;
vc_29_stop_all_sounds();
@@ -3334,7 +3334,7 @@
#if defined(SCUMM_BIG_ENDIAN)
uint r;
if (_effects_offsets) {
- for (r = 0; r <= num; r++)
+ for (r = 0; r < num; r++)
_effects_offsets[r] = READ_LE_UINT32(&_effects_offsets[r]);
}
#endif
More information about the Scummvm-git-logs
mailing list