diff -r 47e686c96d8f -r 5cd91fd1526c parser.cxx --- a/parser.cxx Sat Aug 11 19:35:47 2012 +0300 +++ b/parser.cxx Sun Aug 12 01:52:42 2012 +0300 @@ -238,7 +238,6 @@ // While if (!token.compare ("while")) { - printf ("begin while loop\n"); MUST_NOT_TOPLEVEL PushBlockStack (); @@ -279,22 +278,16 @@ BlockInformation* info = &blockstack[g_BlockStackCursor]; switch (info->type) { case BLOCKTYPE_IF: - printf ("end if\n"); // Adjust the closing mark. w->MoveMark (info->mark1); break; case BLOCKTYPE_WHILE: - printf ("end while loop\n"); - // Write down the instruction to go back to the start of the loop w->Write (DH_GOTO); w->AddReference (info->mark1); // Move the closing mark here since we're at the end of the while loop w->MoveMark (info->mark2); - - // Offset it by 4 since the parser doesn't like having marks directly afte refs - w->OffsetMark (info->mark2, sizeof (word)*2); } // Descend down the stack @@ -624,9 +617,9 @@ } void ScriptReader::PushBlockStack () { + g_BlockStackCursor++; BlockInformation* info = &blockstack[g_BlockStackCursor]; info->type = 0; info->mark1 = 0; info->mark2 = 0; - g_BlockStackCursor++; } \ No newline at end of file