diff options
author | Matthew Hoops | 2012-06-11 20:10:49 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-06-11 20:10:49 -0400 |
commit | ef8239df4877772762876ca1a98ad48676af8d5c (patch) | |
tree | 4b6949d426e9479b619cb75b89c6eab2ed9fe4b7 /engines/sci | |
parent | 9c14f4419b4b9f573d4a955be136108e575266fe (diff) | |
download | scummvm-rg350-ef8239df4877772762876ca1a98ad48676af8d5c.tar.gz scummvm-rg350-ef8239df4877772762876ca1a98ad48676af8d5c.tar.bz2 scummvm-rg350-ef8239df4877772762876ca1a98ad48676af8d5c.zip |
SCI: Fix comment in kString(at)
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 4 |
1 files changed, 1 insertions, 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()]; |