From ef8239df4877772762876ca1a98ad48676af8d5c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 11 Jun 2012 20:10:49 -0400 Subject: SCI: Fix comment in kString(at) --- engines/sci/engine/kstring.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 0877e37a65..33b8c15e9f 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -653,9 +653,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { case 1: // Size return make_reg(0, s->_segMan->getString(argv[1]).size()); case 2: { // At (return value at an index) - // Note that values need to be truncated to bytes, otherwise - // 0xff (negative char -1) will incorrectly be changed to - // 0xffff (negative int16 -1) + // Note that values are put in bytes to avoid sign extension if (argv[1].segment == s->_segMan->getStringSegmentId()) { SciString *string = s->_segMan->lookupString(argv[1]); byte val = string->getRawData()[argv[2].toUint16()]; -- cgit v1.2.3