From 15170d779b5b6782407d4980ac4660bb612540fb Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 2 Feb 2012 13:27:49 +1000 Subject: Zaro boogs! B-) --- LuaSL/src/LuaSL_compile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'LuaSL/src') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index cf9d767..d32a44f 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -1001,19 +1001,20 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Leaf *flow, LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *statement) { - boolean wasNull = FALSE; +// Guess this is not needed after all, and seemed to cause the "states with only one function get dropped" bug. +// boolean wasNull = FALSE; if (NULL == list) { list = newLeaf(LSL_BLOCK_OPEN, NULL, NULL); - wasNull = TRUE; +// wasNull = TRUE; } if (list) { if (statement) { - if (!wasNull) +// if (!wasNull) list->value.blockValue = compiler->currentBlock; // Maybe NULL. if ((compiler->inState) && (LSL_FUNCTION == statement->value.statementValue->type)) -- cgit v1.1