aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/segment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/segment.cpp')
-rw-r--r--engines/sci/engine/segment.cpp2
1 files changed, 1 insertions, 1 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");