diff options
author | Scott Percival | 2020-01-09 20:20:52 +0800 |
---|---|---|
committer | Scott Percival | 2020-01-11 11:25:23 +0800 |
commit | c56584724049a609a31f49890c5dd9bec2a085b4 (patch) | |
tree | 25610680aaf28466c5988b57cd9f5f70e7204ef6 /engines/director | |
parent | 64517fd6a2d9e47fcb07ad7e2357e62ab621805c (diff) | |
download | scummvm-rg350-c56584724049a609a31f49890c5dd9bec2a085b4.tar.gz scummvm-rg350-c56584724049a609a31f49890c5dd9bec2a085b4.tar.bz2 scummvm-rg350-c56584724049a609a31f49890c5dd9bec2a085b4.zip |
DIRECTOR: LINGO: Allow b_length to cast from reference
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 2 | ||||
-rw-r--r-- | engines/director/sprite.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index b7c32dd05e..e02ac63e6f 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -495,6 +495,8 @@ void LB::b_hilite(int nargs) { void LB::b_length(int nargs) { Datum d = g_lingo->pop(); + if (d.type == REFERENCE) + d.toString(); if (d.type != STRING) error("Incorrect type for 'length' function: %s", d.type2str()); diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp index 4a741c30c9..d953ebadaf 100644 --- a/engines/director/sprite.cpp +++ b/engines/director/sprite.cpp @@ -129,7 +129,7 @@ uint16 Sprite::getPattern() { warning("Sprite::getPattern(): Unhandled cast type: %d", _cast->_type); break; } - + // fallthrough default: return 0; } |