[Scummvm-cvs-logs] scummvm master -> ef8239df4877772762876ca1a98ad48676af8d5c

clone2727 clone2727 at gmail.com
Tue Jun 12 02:13:11 CEST 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ef8239df48 SCI: Fix comment in kString(at)


Commit: ef8239df4877772762876ca1a98ad48676af8d5c
    https://github.com/scummvm/scummvm/commit/ef8239df4877772762876ca1a98ad48676af8d5c
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-06-11T17:10:49-07:00

Commit Message:
SCI: Fix comment in kString(at)

Changed paths:
    engines/sci/engine/kstring.cpp



diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 0877e37..33b8c15 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()];






More information about the Scummvm-git-logs mailing list