From 00b7f1d7aa5753e2e992ea9663ea700155a60964 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 29 Dec 2019 00:50:51 +0100 Subject: DIRECTOR: LINGO: Fix cast references in setTheCast() --- engines/director/lingo/lingo-the.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/director') diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 592542f11e..50194e294c 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -742,17 +742,17 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) { } if (id1.type == INT) { - id = id1.u.i + score->_castIDoffset; + id = id1.u.i; } else { warning("Lingo::setTheCast(): Unknown the cast id type: %s", id1.type2str()); return; } CastType castType = score->_castTypes[id]; - CastInfo *castInfo = score->_castsInfo[id]; + CastInfo *castInfo = score->_castsInfo[id + score->_castIDoffset]; if (!castInfo) { - warning("Lingo::setTheCast(): The cast %d not found", id); + warning("Lingo::setTheCast(): The cast %d not found. type: %d", id, castType); return; } -- cgit v1.2.3