From 7ba7af9d55e8c2b09b67ba59f9115c25acfc80e8 Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Wed, 7 Aug 2019 13:51:39 +0200 Subject: [PATCH] fixed boolean off-by-one. --- src/main/java/dk/camelot64/kickc/Compiler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index d11abe7c5..d7a49dd98 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -32,7 +32,7 @@ public class Compiler { private boolean enableZeroPageCoalasce = false; /** Disable loop head constant optimization. It identified whenever a while()/for() has a constant condition on the first iteration and rewrites it. */ - private boolean disableLoopHeadConstant = true; + private boolean disableLoopHeadConstant = false; public Compiler() { this.program = new Program(); @@ -47,7 +47,7 @@ public class Compiler { } void disableLoopHeadConstant() { - this.disableLoopHeadConstant = false; + this.disableLoopHeadConstant = true; } void setTargetPlatform(TargetPlatform targetPlatform) {