[Scummvm-cvs-logs] SF.net SVN: scummvm:[54151] scummvm/trunk/backends/fs/n64/romfsstream.cpp

hkz at users.sourceforge.net hkz at users.sourceforge.net
Tue Nov 9 12:00:58 CET 2010


Revision: 54151
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54151&view=rev
Author:   hkz
Date:     2010-11-09 11:00:56 +0000 (Tue, 09 Nov 2010)

Log Message:
-----------
N64: correct wrong check in romfs stream code

my implementation of romfs_seek is based on lseek, not on fseek,
so it returns the offset on successful completion, not 0, corrected
the check in RomfsStream::seek().

Modified Paths:
--------------
    scummvm/trunk/backends/fs/n64/romfsstream.cpp

Modified: scummvm/trunk/backends/fs/n64/romfsstream.cpp
===================================================================
--- scummvm/trunk/backends/fs/n64/romfsstream.cpp	2010-11-09 10:07:34 UTC (rev 54150)
+++ scummvm/trunk/backends/fs/n64/romfsstream.cpp	2010-11-09 11:00:56 UTC (rev 54151)
@@ -59,7 +59,7 @@
 }
 
 bool RomfsStream::seek(int32 offs, int whence) {
-	return romfs_seek((ROMFILE *)_handle, offs, whence) == 0;
+	return romfs_seek((ROMFILE *)_handle, offs, whence) >= 0;
 }
 
 uint32 RomfsStream::read(void *ptr, uint32 len) {


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