diff options
author | Filippos Karapetis | 2009-12-24 20:45:32 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-24 20:45:32 +0000 |
commit | 98053616d18de1439438f962e2b63c0c33158710 (patch) | |
tree | 3969def2f89a982dd0deef79033027eab8f47338 | |
parent | 20c39b05eacbb761133820310422801c35c7a2c8 (diff) | |
download | scummvm-rg350-98053616d18de1439438f962e2b63c0c33158710.tar.gz scummvm-rg350-98053616d18de1439438f962e2b63c0c33158710.tar.bz2 scummvm-rg350-98053616d18de1439438f962e2b63c0c33158710.zip |
Silenced some MSVC warnings
svn-id: r46536
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index bc706ea934..a59bf4e22f 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -397,8 +397,9 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { // A count of -1 means fill the rest of the array uint16 count = argv[3].toSint16() == -1 ? array->getSize() - index : argv[3].toUint16(); + uint16 arraySize = array->getSize(); - if (array->getSize() < index + count) + if (arraySize < index + count) array->setSize(index + count); for (uint16 i = 0; i < count; i++) @@ -498,8 +499,9 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { // A count of -1 means fill the rest of the array uint16 count = argv[3].toSint16() == -1 ? string->getSize() - index : argv[3].toUint16(); + uint16 stringSize = string->getSize(); - if (string->getSize() < index + count) + if (stringSize < index + count) string->setSize(index + count); for (uint16 i = 0; i < count; i++) |