aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kstring.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 42ca0cc374..5e124e84e0 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -241,15 +241,10 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (xfer == '0')
fillchar = '0';
- else
-
- if (xfer == '=') {
- align = ALIGN_CENTRE;
- source++;
- } else
-
- if (isdigit(xfer))
- source--; /* Stepped over length argument */
+ else if (xfer == '=')
+ align = ALIGN_CENTRE;
+ else if (isdigit(xfer) || (xfer == '-'))
+ source--; // Go to start of length argument
str_leng = strtol(source, &destp, 10);