From a5d14105d8ffb4ee94824a3a9f34332b148456e0 Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Thu, 13 Feb 2020 18:26:52 +0100 Subject: [PATCH] Fixed const in test. --- src/test/kc/comparison-rewriting.kc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/kc/comparison-rewriting.kc b/src/test/kc/comparison-rewriting.kc index 74c9deec5..a8ad8885b 100644 --- a/src/test/kc/comparison-rewriting.kc +++ b/src/test/kc/comparison-rewriting.kc @@ -1,13 +1,15 @@ // Test rewriting of constant comparisons void main() { - byte* screen = $0400; + const byte* SCREEN = $0400; - for(byte* sc : screen..screen+1000) *sc=' '; + for(byte* sc : SCREEN..SCREEN+1000) *sc=' '; byte[] header = " < <= == >= >"; for( byte i=0; header[i]!=0; i++) - screen[i] = header[i]; + SCREEN[i] = header[i]; + + byte* screen = SCREEN; for(byte i=0;i<=9;i++) { screen +=40;