Skip to content

Commit

Permalink
Bug fix for line number handling
Browse files Browse the repository at this point in the history
Line number was off when a while loop was repeated
  • Loading branch information
chrishamm authored and dc42 committed Sep 1, 2023
1 parent b62ebfe commit ad9c82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GCodes/GCodeBuffer/StringParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ void StringParser::ProcessWhileCommand() THROWS(GCodeException)
}
else
{
gb.GetBlockState().SetLoopBlock(GetFilePosition(), gb.GetLineNumber());
gb.GetBlockState().SetLoopBlock(GetFilePosition(), gb.GetLineNumber() - 1);
}

if (!EvaluateCondition())
Expand Down

0 comments on commit ad9c82b

Please sign in to comment.