aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_compile.c7
1 files changed, 4 insertions, 3 deletions
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,
1001 1001
1002LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *statement) 1002LSL_Leaf *collectStatements(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *statement)
1003{ 1003{
1004 boolean wasNull = FALSE; 1004// Guess this is not needed after all, and seemed to cause the "states with only one function get dropped" bug.
1005// boolean wasNull = FALSE;
1005 1006
1006 if (NULL == list) 1007 if (NULL == list)
1007 { 1008 {
1008 list = newLeaf(LSL_BLOCK_OPEN, NULL, NULL); 1009 list = newLeaf(LSL_BLOCK_OPEN, NULL, NULL);
1009 wasNull = TRUE; 1010// wasNull = TRUE;
1010 } 1011 }
1011 1012
1012 if (list) 1013 if (list)
1013 { 1014 {
1014 if (statement) 1015 if (statement)
1015 { 1016 {
1016 if (!wasNull) 1017// if (!wasNull)
1017 list->value.blockValue = compiler->currentBlock; // Maybe NULL. 1018 list->value.blockValue = compiler->currentBlock; // Maybe NULL.
1018 1019
1019 if ((compiler->inState) && (LSL_FUNCTION == statement->value.statementValue->type)) 1020 if ((compiler->inState) && (LSL_FUNCTION == statement->value.statementValue->type))