aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2009-05-05 12:28:12 +0000
committerMax Horn2009-05-05 12:28:12 +0000
commitc36694764de80af0fe65005599ce5ad91a12398d (patch)
tree4718fb875e42350fed3563d55c282ff3f53ea3ef /engines/sci/engine
parent7e51eb647842e03326eb4b1d41401538f9903eb6 (diff)
downloadscummvm-rg350-c36694764de80af0fe65005599ce5ad91a12398d.tar.gz
scummvm-rg350-c36694764de80af0fe65005599ce5ad91a12398d.tar.bz2
scummvm-rg350-c36694764de80af0fe65005599ce5ad91a12398d.zip
SCI: Fix my previous changes to internal_stringfrag_strcmp (side remark: Another bonus when using git resp. git-svn, and not SVN: you can commit stuff and test it some time before going public, thus avoid stupid screw ups like this one ;)
svn-id: r40325
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/stringfrag.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/stringfrag.cpp b/engines/sci/engine/stringfrag.cpp
index a794d85ae0..7cbff1d3a9 100644
--- a/engines/sci/engine/stringfrag.cpp
+++ b/engines/sci/engine/stringfrag.cpp
@@ -344,15 +344,15 @@ void stringfrag_strncpy(EngineState *s, reg_t dest, reg_t src, int len) {
int internal_stringfrag_strcmp(EngineState *s, reg_t *s1, reg_t *s2) {
int c1, c2;
while (1) {
- c1 = (byte)(s1->offset & 0xff00);
- c2 = (byte)(s2->offset & 0xff00);
+ c1 = (uint16)(s1->offset & 0xff00);
+ c2 = (uint16)(s2->offset & 0xff00);
if (c1 != c2) // We found a difference
return c1 - c2;
else if (c1 == 0) // Both strings ended
return 0;
- c1 = (byte)(s1->offset & 0x00ff);
- c2 = (byte)(s2->offset & 0x00ff);
+ c1 = (uint16)(s1->offset & 0x00ff);
+ c2 = (uint16)(s2->offset & 0x00ff);
if (c1 != c2) // We found a difference
return c1 - c2;
else if (c1 == 0) // Both strings ended
@@ -374,8 +374,8 @@ int internal_stringfrag_strncmp(EngineState *s, reg_t *s1, reg_t *s2, int len) {
while (len) {
if (len--)
return 0;
- c1 = (byte)(s1->offset & 0xff00);
- c2 = (byte)(s2->offset & 0xff00);
+ c1 = (uint16)(s1->offset & 0xff00);
+ c2 = (uint16)(s2->offset & 0xff00);
if (c1 != c2) // We found a difference
return c1 - c2;
else if (c1 == 0) // Both strings ended
@@ -384,8 +384,8 @@ int internal_stringfrag_strncmp(EngineState *s, reg_t *s1, reg_t *s2, int len) {
if (len--)
return 0;
- c1 = (byte)(s1->offset & 0x00ff);
- c2 = (byte)(s2->offset & 0x00ff);
+ c1 = (uint16)(s1->offset & 0x00ff);
+ c2 = (uint16)(s2->offset & 0x00ff);
if (c1 != c2) // We found a difference
return c1 - c2;
else if (c1 == 0) // Both strings ended