[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.28,1.29

Max Horn fingolfin at users.sourceforge.net
Mon May 19 12:20:17 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv25570/common

Modified Files:
	file.cpp 
Log Message:
Patch #739911: Fix for undefined behaviour in fopenNoCase()

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- file.cpp	1 May 2003 12:36:36 -0000	1.28
+++ file.cpp	19 May 2003 19:19:32 -0000	1.29
@@ -71,16 +71,16 @@
 
 		ptr = buf + len;
 		do
-			*ptr++ = toupper(*ptr);
-		while (*ptr);
+			*ptr = toupper(*ptr);
+		while (*ptr++);
 		file = fopen(buf, mode);
 		if (file)
 			return file;
 
 		ptr = buf + len;
 		do
-			*ptr++ = tolower(*ptr);
-		while (*ptr);
+			*ptr = tolower(*ptr);
+		while (*ptr++);
 		file = fopen(buf, mode);
 		if (file)
 			return file;





More information about the Scummvm-git-logs mailing list