aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-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 7b8db22e3f..b383f88840 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -336,8 +336,9 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (align >= 0)
while (str_leng-- > 1)
*target++ = ' '; /* Format into the text */
-
- *target++ = arguments[paramindex++];
+ char argchar = arguments[paramindex++];
+ if (argchar)
+ *target++ = argchar;
mode = 0;
}
break;