[Scummvm-cvs-logs] SF.net SVN: scummvm:[52269] scummvm/trunk/engines/sci/engine/kfile.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Sun Aug 22 05:50:43 CEST 2010
Revision: 52269
http://scummvm.svn.sourceforge.net/scummvm/?rev=52269&view=rev
Author: mthreepwood
Date: 2010-08-22 03:50:42 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
SCI: Fix a bug in kFileIOWriteString. The first return statement should go inside the if-statement.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kfile.cpp
Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp 2010-08-21 20:14:46 UTC (rev 52268)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp 2010-08-22 03:50:42 UTC (rev 52269)
@@ -853,9 +853,12 @@
debugC(2, kDebugLevelFile, "kFileIO(writeString): %d", handle);
FileHandle *f = getFileFromHandle(s, handle);
- if (f)
+
+ if (f) {
f->_out->write(str.c_str(), str.size());
return NULL_REG;
+ }
+
return make_reg(0, 6); // DOS - invalid handle
}
@@ -866,8 +869,10 @@
debugC(2, kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence);
FileHandle *f = getFileFromHandle(s, handle);
+
if (f)
s->r_acc = make_reg(0, f->_in->seek(offset, whence));
+
return SIGNAL_REG;
}
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