From 44dfa4c49fef7c6d3e92b8f1fc45259404ec56ee Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 4 Nov 2016 14:53:39 -0500 Subject: 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. --- engines/sci/engine/kstring.cpp | 5 +++-- 1 file 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) { -- cgit v1.2.3