diff options
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index b69e3d0328..0f6dd5894f 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -281,7 +281,13 @@ whitespace [\t ] if (g_lingo->_builtins.contains(yytext)) { int type = g_lingo->_builtins[yytext]->type; - if ((type == BLTIN || type == FBLTIN) && g_lingo->_builtins[yytext]->parens == false) { + if ((type == BLTIN || type == FBLTIN || type == RBLTIN) && g_lingo->_builtins[yytext]->parens == false) { + if (type == RBLTIN) { + if (g_lingo->_builtins[yytext]->nargs != 1 || g_lingo->_builtins[yytext]->maxArgs != 1) + error("Incorrectly set RBLTIN %s", yytext); + + return RBLTINONEARG; + } if (g_lingo->_builtins[yytext]->nargs == 0) { if (g_lingo->_builtins[yytext]->maxArgs == 0) return type == BLTIN ? BLTINNOARGS : FBLTINNOARGS; |