[Scummvm-cvs-logs] SF.net SVN: scummvm: [21536] scummvm/trunk/engines/sword2/resman.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Apr 1 13:56:01 CEST 2006
Revision: 21536
Author: eriktorbjorn
Date: 2006-04-01 13:55:41 -0800 (Sat, 01 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21536&view=rev
Log Message:
-----------
Guard against too many entries in resource.inf, since there has been a TODO
comment about that (removed in the previous commit) since roughly forever.
Modified Paths:
--------------
scummvm/trunk/engines/sword2/resman.cpp
Modified: scummvm/trunk/engines/sword2/resman.cpp
===================================================================
--- scummvm/trunk/engines/sword2/resman.cpp 2006-04-01 21:52:33 UTC (rev 21535)
+++ scummvm/trunk/engines/sword2/resman.cpp 2006-04-01 21:55:41 UTC (rev 21536)
@@ -89,7 +89,8 @@
while (file.readLine(_resFiles[_totalClusters].fileName, sizeof(_resFiles[_totalClusters].fileName))) {
_resFiles[_totalClusters].numEntries = -1;
_resFiles[_totalClusters].entryTab = NULL;
- _totalClusters++;
+ if (++_totalClusters >= MAX_res_files)
+ error("Too many entries in resource.inf");
}
file.close();
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