aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2016-11-04 14:53:39 -0500
committerColin Snover2016-11-04 15:16:10 -0500
commit44dfa4c49fef7c6d3e92b8f1fc45259404ec56ee (patch)
tree73f576eeeae7cdcfe92b9871325e9089b41bce5a /engines/sci
parente58dad8bb6f50c160de4465551abbe877b673360 (diff)
downloadscummvm-rg350-44dfa4c49fef7c6d3e92b8f1fc45259404ec56ee.tar.gz
scummvm-rg350-44dfa4c49fef7c6d3e92b8f1fc45259404ec56ee.tar.bz2
scummvm-rg350-44dfa4c49fef7c6d3e92b8f1fc45259404ec56ee.zip
SCI32: Treat %d as unsigned in kString
At least Shivers has VMDs with resource IDs above 2^15; treating %d as signed means that the wrong filename gets created.
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kstring.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 6ec61343b0..bfabbcc90e 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -733,11 +733,12 @@ namespace {
}
bool isSignedType(const char type) {
- return type == 'd' || type == 'i';
+ // For whatever reason, %d ends up being treated as unsigned in SSCI
+ return type == 'i';
}
bool isUnsignedType(const char type) {
- return strchr("uxXoc", type);
+ return strchr("duxXoc", type);
}
bool isStringType(const char type) {