aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-29 00:50:51 +0100
committerEugene Sandulenko2019-12-29 00:51:16 +0100
commit00b7f1d7aa5753e2e992ea9663ea700155a60964 (patch)
tree5b86254bfd49f9fd84dae263ce081fad9c468387 /engines
parent53a2ca9c5edca76ca6df33a8bc045d476e3f84ca (diff)
downloadscummvm-rg350-00b7f1d7aa5753e2e992ea9663ea700155a60964.tar.gz
scummvm-rg350-00b7f1d7aa5753e2e992ea9663ea700155a60964.tar.bz2
scummvm-rg350-00b7f1d7aa5753e2e992ea9663ea700155a60964.zip
DIRECTOR: LINGO: Fix cast references in setTheCast()
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-the.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}