[Scummvm-cvs-logs] CVS: scummvm/simon simonverb.cpp,1.2,1.3

Nicolas Bacca arisme at users.sourceforge.net
Thu Jul 18 15:51:06 CEST 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv16758

Modified Files:
	simonverb.cpp 
Log Message:
Workaround for French version crash

Index: simonverb.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simonverb.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- simonverb.cpp	7 Jul 2002 19:06:48 -0000	1.2
+++ simonverb.cpp	18 Jul 2002 22:50:31 -0000	1.3
@@ -414,7 +414,11 @@
 		return false;
 
 	string_ptr = getStringPtrByID(_stringid_array_2[a]);
-	x = (53 - (strlen((const char *)string_ptr) - 1)) * 3;
+	// Arisme : hack for long strings in the French version
+	if ((strlen((const char*)string_ptr) - 1) <= 53)
+		x = (53 - (strlen((const char *)string_ptr) - 1)) * 3;
+	else
+		x = 0;
 	showActionString(x, string_ptr);
 
 	return true;
@@ -434,7 +438,11 @@
 		return false;
 
 	string_ptr = getStringPtrByID(child2->string_id);
-	x = (53 - (strlen((const char *)string_ptr) - 1)) * 3;
+	// Arisme : hack for long strings in the French version
+	if ((strlen((const char*)string_ptr) - 1) <= 53)
+		x = (53 - (strlen((const char *)string_ptr) - 1)) * 3;
+	else
+		x = 0;
 	showActionString(x, string_ptr);
 	return true;
 }





More information about the Scummvm-git-logs mailing list