From a60bb6fbc1ad1e4e7c100d1ccd166d6e219473ac Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 14 May 2014 19:50:41 +1000 Subject: LSL's EOF sucks, Lua's 0 isn't false sucks more. Work around both. --- src/LuaSL/LuaSL_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/LuaSL') diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index 90c9ac1..e31e157 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c @@ -1613,11 +1613,12 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state fprintf(file, " "); if (LSL_ELSE != statement->type) { + fprintf(file, "_LSL.toBool("); if (statement->parenthesis) outputRawParenthesisToken(file, mode, statement->parenthesis, ""); else outputLeaf(file, mode, statement->expressions); - fprintf(file, " then\n"); + fprintf(file, ") then\n"); } if (statement->block) outputRawBlock(file, mode, statement->block, FALSE); -- cgit v1.1