diff options
author | Colin Snover | 2017-02-23 11:25:59 -0600 |
---|---|---|
committer | Colin Snover | 2017-03-27 19:42:31 -0500 |
commit | 323e74bda97716cc34ba99a0a5534e2d87845ce9 (patch) | |
tree | 69bc2efe0144a81aee987e30490ff1b240214a92 /engines/sci | |
parent | 816296fd258841977cecdf7507d6a567693ecbd9 (diff) | |
download | scummvm-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.cpp | 2 |
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); |