Fixed up comparision operator for FOR

This commit is contained in:
Mattias Hansson 2025-11-17 22:58:58 +01:00
parent c647ff6ba9
commit ee74135839

View file

@ -184,9 +184,9 @@ func (c *ForCommand) Generate(ctx *compiler.CompilerContext) ([]string, error) {
// DOWNTO: continue if var >= end (skip if var < end)
var op comparisonOp
if c.isDownto {
op = opLess // skip if var < end
op = opGreaterEqual // skip if var < end
} else {
op = opGreater // skip if var > end
op = opLessEqual // skip if var > end
}
varOp := &operandInfo{