[Scummvm-cvs-logs] SF.net SVN: scummvm:[45961] scummvm/trunk/engines/teenagent/surface_list. cpp
megath at users.sourceforge.net
megath at users.sourceforge.net
Tue Nov 17 22:47:26 CET 2009
Revision: 45961
http://scummvm.svn.sourceforge.net/scummvm/?rev=45961&view=rev
Author: megath
Date: 2009-11-17 21:47:26 +0000 (Tue, 17 Nov 2009)
Log Message:
-----------
guard surface list from the sizes of zero
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/surface_list.cpp
Modified: scummvm/trunk/engines/teenagent/surface_list.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/surface_list.cpp 2009-11-17 21:42:56 UTC (rev 45960)
+++ scummvm/trunk/engines/teenagent/surface_list.cpp 2009-11-17 21:47:26 UTC (rev 45961)
@@ -33,12 +33,15 @@
free();
byte fn = stream->readByte();
- if (stream->eos() || fn == 0)
+ if (stream->eos())
return;
debug(0, "loading %u surfaces from list (skip %d)", fn, sub_hack);
surfaces_n = fn - sub_hack;
+ if (surfaces_n == 0)
+ return;
+
surfaces = new Surface[surfaces_n];
byte i;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list