From a03afd18985ffef220ffbdce3ea4c66c035609da Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 24 Jun 2010 21:09:38 +0000 Subject: SCI: Make kStrAt clear segment when writing characters This is necessary since the uninitialized value detection from r50211, and is analogous to seg_manager.cpp's setChar. (Triggered in LSL3 age verification.) svn-id: r50234 --- engines/sci/engine/kstring.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 1927a79eea..f2f9543ad2 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -115,12 +115,14 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { if (argc > 2) { /* Request to modify this char */ tmp.offset &= 0xff00; tmp.offset |= newvalue; + tmp.segment = 0; } } else { value = tmp.offset >> 8; if (argc > 2) { /* Request to modify this char */ tmp.offset &= 0x00ff; tmp.offset |= newvalue << 8; + tmp.segment = 0; } } } -- cgit v1.2.3