fixed bug in parser for if statement without else

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@322 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-06 01:10:58 +00:00
parent 90b685f0f8
commit b5f964d85b
+2 -1
View File
@@ -405,7 +405,8 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
jmpEnd = script.getLabel(); // jmp_end:
script.addInstruction(I_JUMP, 0xFFFF); // jump lbl_end
script.comeFrom(jmpElse); // lbl_else:
if (input.read() == _("else")) { // else
if (input.peek() == _("else")) { // else
input.read();
parseOper(input, script, PREC_SET); // CCC
} else {
script.addInstruction(I_PUSH_CONST, script_nil);