diff options
author | Filippos Karapetis | 2010-05-30 16:14:31 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-30 16:14:31 +0000 |
commit | c32e88fe0bb61e75ca983072ba28102d4efbf123 (patch) | |
tree | 1da8c37a9256743e2c62abc8d3a70d84c26e8e55 /engines/sci/engine/features.cpp | |
parent | 0276ec835ef3c77a4dbf772ea54cc6d5292452f2 (diff) | |
download | scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.tar.gz scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.tar.bz2 scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.zip |
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
Diffstat (limited to 'engines/sci/engine/features.cpp')
-rw-r--r-- | engines/sci/engine/features.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index 1539b3d190..3ad5630670 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -87,7 +87,7 @@ bool GameFeatures::autoDetectSoundType() { opcode = extOpcode >> 1; // Check for end of script - if (opcode == op_ret || offset >= script->_bufSize) + if (opcode == op_ret || offset >= script->getBufSize()) break; // The play method of the Sound object pushes the DoSound command @@ -223,7 +223,7 @@ bool GameFeatures::autoDetectLofsType(int methodNum) { opcode = extOpcode >> 1; // Check for end of script - if (opcode == op_ret || offset >= script->_bufSize) + if (opcode == op_ret || offset >= script->getBufSize()) break; if (opcode == op_lofsa || opcode == op_lofss) { @@ -231,13 +231,13 @@ bool GameFeatures::autoDetectLofsType(int methodNum) { uint16 lofs = opparams[0]; // Check for going out of bounds when interpreting as abs/rel - if (lofs >= script->_bufSize) + if (lofs >= script->getBufSize()) _lofsType = SCI_VERSION_0_EARLY; if ((signed)offset + (int16)lofs < 0) _lofsType = SCI_VERSION_1_MIDDLE; - if ((signed)offset + (int16)lofs >= (signed)script->_bufSize) + if ((signed)offset + (int16)lofs >= (signed)script->getBufSize()) _lofsType = SCI_VERSION_1_MIDDLE; if (_lofsType != SCI_VERSION_NONE) @@ -309,7 +309,7 @@ bool GameFeatures::autoDetectGfxFunctionsType(int methodNum) { opcode = extOpcode >> 1; // Check for end of script - if (opcode == op_ret || offset >= script->_bufSize) + if (opcode == op_ret || offset >= script->getBufSize()) break; if (opcode == op_callk) { @@ -412,7 +412,7 @@ bool GameFeatures::autoDetectSci21KernelType() { opcode = extOpcode >> 1; // Check for end of script - if (opcode == op_ret || offset >= script->_bufSize) + if (opcode == op_ret || offset >= script->getBufSize()) break; if (opcode == op_callk) { @@ -465,7 +465,7 @@ bool GameFeatures::autoDetectMoveCountType() { opcode = extOpcode >> 1; // Check for end of script - if (opcode == op_ret || offset >= script->_bufSize) + if (opcode == op_ret || offset >= script->getBufSize()) break; if (opcode == op_callk) { |