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.

svn-id: r21536
This commit is contained in:
Torbjörn Andersson 2006-04-01 21:55:41 +00:00
parent 2197597f9a
commit d6f348638d

View File

@ -89,7 +89,8 @@ ResourceManager::ResourceManager(Sword2Engine *vm) {
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();