From 9d50dac101b0d545b23397eef83f34b75a382303 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 31 May 2010 09:31:05 +0000 Subject: [PATCH] SCI: skip spaces in kReadNumber - this happens in lsl3 intro svn-id: r49345 --- engines/sci/engine/kstring.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 69090c4335d..90096d5c170 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -151,6 +151,10 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) { source++; } while (*source) { + if (*source == ' ') { + source++; // skip spaces - happens in lsl3 intro + continue; + } if ((*source < '0') || (*source > '9')) { // TODO: this happens in lsl5 right in the intro -> we get '1' '3' 0xCD 0xCD 0xCD 0xCD 0xCD // find out why this happens and fix it