aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2017-02-23 11:25:59 -0600
committerColin Snover2017-03-27 19:42:31 -0500
commit323e74bda97716cc34ba99a0a5534e2d87845ce9 (patch)
tree69bc2efe0144a81aee987e30490ff1b240214a92 /engines/sci
parent816296fd258841977cecdf7507d6a567693ecbd9 (diff)
downloadscummvm-rg350-323e74bda97716cc34ba99a0a5534e2d87845ce9.tar.gz
scummvm-rg350-323e74bda97716cc34ba99a0a5534e2d87845ce9.tar.bz2
scummvm-rg350-323e74bda97716cc34ba99a0a5534e2d87845ce9.zip
SCI: Simplify calculation of locals size in SCI0/1
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index f790b411cf..e1ab6ea77e 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -184,7 +184,7 @@ void Script::load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptP
if (localsTable) {
// skip header (4 bytes)
_localsOffset = localsTable - *_buf + 4;
- _localsCount = (_buf->getUint16LEAt(_localsOffset - 2) - 4) >> 1; // half block size
+ _localsCount = localsTable.size() / 2 - 2;
}
} else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1_LATE) {
_numExports = _buf->getUint16SEAt(kSci11NumExportsOffset);