aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/segment.cpp2
-rw-r--r--engines/sci/engine/segment.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 99fcb1b821..492e928e31 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -161,7 +161,7 @@ void Script::init(int script_nr, ResourceManager *resMan) {
}
// As mentioned above, the script and the heap together should not exceed 64KB
- if (_bufSize > 65535)
+ if (script->size + heap->size > 65535)
error("Script and heap sizes combined exceed 64K. This means a fundamental "
"design bug was made regarding SCI1.1 and newer games.\nPlease "
"report this error to the ScummVM team");
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index 8759c630e8..045cb119a3 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -354,7 +354,7 @@ protected:
private:
size_t _scriptSize;
size_t _heapSize;
- size_t _bufSize;
+ uint16 _bufSize;
const uint16 *_exportTable; /**< Abs. offset of the export table or 0 if not present */
uint16 _numExports; /**< Number of entries in the exports table */