aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/lingo/lingo-bytecode.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 832566c44a..618909cfb8 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -237,9 +237,12 @@ void Lingo::addCodeV4(Common::SeekableSubReadStreamEndian &stream, ScriptType ty
}
} else {
+ // exit condition
+ if (opcode == 0x01) {
+ offset_list.push_back(_currentScript->size());
+ g_lingo->code1(STOP);
// unimplemented instruction
-
- if (opcode < 0x40) { // 1 byte instruction
+ } else if (opcode < 0x40) { // 1 byte instruction
offset_list.push_back(_currentScript->size());
g_lingo->code1(Lingo::c_unk);
g_lingo->codeInt(opcode);