[Scummvm-cvs-logs] SF.net SVN: scummvm:[47790] scummvm/trunk/engines/sci/engine/kfile.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Mon Feb 1 04:59:48 CET 2010
Revision: 47790
http://scummvm.svn.sourceforge.net/scummvm/?rev=47790&view=rev
Author: mthreepwood
Date: 2010-02-01 03:59:48 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Torin calls K_FILEIO_OPEN without a file mode to open with. Assume that it's opening the file for reading as it appears that it is just testing if it exists. Torin (and the demo) progress a little farther now.
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-02-01 01:05:08 UTC (rev 47789)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp 2010-02-01 03:59:48 UTC (rev 47790)
@@ -712,8 +712,10 @@
switch (func_nr) {
case K_FILEIO_OPEN : {
Common::String name = s->_segMan->getString(argv[1]);
- int mode = argv[2].toUint16();
+ // SCI32 can call K_FILEIO_OPEN with only two arguments. It seems to just be checking if it exists.
+ int mode = (argc < 3) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[2].toUint16();
+
// SQ4 floppy prepends /\ to the filenames
if (name.hasPrefix("/\\")) {
name.deleteChar(0);
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