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

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Sun Sep 27 00:55:24 CEST 2009


Revision: 44383
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44383&view=rev
Author:   wjpalenstijn
Date:     2009-09-26 22:55:24 +0000 (Sat, 26 Sep 2009)

Log Message:
-----------
SCI: Fix regression in r44081 breaking walking in QfG2

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kstring.cpp

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-09-26 22:50:35 UTC (rev 44382)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-09-26 22:55:24 UTC (rev 44383)
@@ -352,7 +352,7 @@
 
 
 reg_t kStrAt(EngineState *s, int, int argc, reg_t *argv) {
-	char *dest = s->segMan->derefString(argv[0]);
+	byte *dest = (byte*)s->segMan->derefString(argv[0]);
 	reg_t *dest2;
 
 	if (!dest) {
@@ -370,7 +370,8 @@
 	if ((argc == 2) &&
 	        /* Our pathfinder already works around the issue we're trying to fix */
 	        (strcmp(s->segMan->getDescription(argv[0]), AVOIDPATH_DYNMEM_STRING) != 0) &&
-	        ((strlen(dest) < 2) || (!lsl5PasswordWorkaround && !is_print_str(dest)))) {
+	        ((strlen((const char*)dest) < 2) ||
+	         (!lsl5PasswordWorkaround && !is_print_str((const char*)dest)))) {
 		// SQ4 array handling detected
 #ifndef SCUMM_BIG_ENDIAN
 		int odd = argv[1].toUint16() & 1;
@@ -378,7 +379,7 @@
 		int odd = !(argv[1].toUint16() & 1);
 #endif
 		dest2 = ((reg_t *) dest) + (argv[1].toUint16() / 2);
-		dest = ((char *)(&dest2->offset)) + odd;
+		dest = ((byte *)(&dest2->offset)) + odd;
 	} else
 		dest += argv[1].toUint16();
 


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