[Scummvm-cvs-logs] SF.net SVN: scummvm:[47575] scummvm/trunk/engines/sci/engine/kfile.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Jan 26 22:27:14 CET 2010


Revision: 47575
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47575&view=rev
Author:   thebluegr
Date:     2010-01-26 21:27:13 +0000 (Tue, 26 Jan 2010)

Log Message:
-----------
Fixed reading of options file (game.opt) for Hoyle 3

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-01-26 21:12:13 UTC (rev 47574)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2010-01-26 21:27:13 UTC (rev 47575)
@@ -225,7 +225,11 @@
 		error("fgets_wrapper: Trying to read from file '%s' opened for writing", f->_name.c_str());
 		return;
 	}
-	f->_in->readLine(dest, maxsize);
+	if (maxsize > 1)
+		f->_in->readLine(dest, maxsize);
+	else
+		*dest = f->_in->readByte();
+
 	// The returned string must not have an ending LF
 	int strSize = strlen(dest);
 	if (strSize > 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