aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-08 21:21:11 +0200
committerEugene Sandulenko2016-08-08 21:21:11 +0200
commit0fe0b15d95f07c0800746320d4a7a1b0497956d9 (patch)
tree42ead7b1c84f04c290fcf023843fdae9549abf16 /engines
parent9dff05e51b41ae3b9eaac4a629ca73baebf5856a (diff)
downloadscummvm-rg350-0fe0b15d95f07c0800746320d4a7a1b0497956d9.tar.gz
scummvm-rg350-0fe0b15d95f07c0800746320d4a7a1b0497956d9.tar.bz2
scummvm-rg350-0fe0b15d95f07c0800746320d4a7a1b0497956d9.zip
DIRECTOR: Lingo: Fix calling built-ins with variable number of parameters
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-code.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 0c1b5d61e4..8d2b663b1b 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -762,7 +762,7 @@ void Lingo::c_call() {
return;
}
- if (sym->nargs < nargs) {
+ if (sym->nargs != -1 && sym->nargs < nargs) {
warning("Incorrect number of arguments for function %s. Dropping extra %d", name.c_str(), nargs - sym->nargs);
for (int i = 0; i < nargs - sym->nargs; i++)
g_lingo->pop();