Don't mark the condition of do-while as a jump target without a continue

In contrast to the other loops, where the condition is always jumped to.
liquid_container
Günther Brammer 2016-01-17 01:54:51 +01:00
parent 00f013d59e
commit b2c263bd0e
1 changed files with 5 additions and 1 deletions

View File

@ -1947,7 +1947,11 @@ void C4AulParse::Parse_DoWhile()
PushLoop();
// Execute body
Parse_Statement();
int BeforeCond = JumpHere();
int BeforeCond = -1;
if (Type == PARSER)
for (Loop::Control *pCtrl2 = pLoopStack->Controls; pCtrl2; pCtrl2 = pCtrl2->Next)
if (!pCtrl2->Break)
BeforeCond = JumpHere();
// Execute condition
if (TokenType != ATT_IDTF || !SEqual(Idtf, C4AUL_While))
UnexpectedToken("'while'");