[Scummvm-cvs-logs] SF.net SVN: scummvm:[47360] tools/trunk/engines/mohawk/mohawk_file.cpp
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Mon Jan 18 21:03:19 CET 2010
Revision: 47360
http://scummvm.svn.sourceforge.net/scummvm/?rev=47360&view=rev
Author: tdhs
Date: 2010-01-18 20:03:17 +0000 (Mon, 18 Jan 2010)
Log Message:
-----------
Segfault in Mohawk tools corrected. (Thanks eriktorbjorn).
Modified Paths:
--------------
tools/trunk/engines/mohawk/mohawk_file.cpp
Modified: tools/trunk/engines/mohawk/mohawk_file.cpp
===================================================================
--- tools/trunk/engines/mohawk/mohawk_file.cpp 2010-01-18 19:15:05 UTC (rev 47359)
+++ tools/trunk/engines/mohawk/mohawk_file.cpp 2010-01-18 20:03:17 UTC (rev 47360)
@@ -220,7 +220,7 @@
output.stream = new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex].offset + _fileTable[fileTableIndex].dataSize);
output.tag = tag;
output.id = id;
- if (_types[typeIndex].nameTable.num > 0)
+ if (idIndex < _types[typeIndex].nameTable.num)
output.name = _types[typeIndex].nameTable.entries[idIndex].name;
return output;
@@ -253,7 +253,7 @@
output.tag = _types[_curExType].tag;
output.id = _types[_curExType].resTable.entries[_curExTypeIndex].id;
- if (_types[_curExType].nameTable.num > 0)
+ if (_curExTypeIndex < _types[_curExType].nameTable.num)
output.name = _types[_curExType].nameTable.entries[_curExTypeIndex].name;
_curExTypeIndex++;
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