changeset 55:1568fa902257

Fix error in calculating match length during tokenization
author William Astle <lost@l-w.ca>
date Thu, 22 Dec 2022 23:08:49 -0700
parents cc7e60e51c07
children f741bb544a04
files src/lwbasic.s
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lwbasic.s	Wed Dec 21 23:40:16 2022 -0700
+++ b/src/lwbasic.s	Thu Dec 22 23:08:49 2022 -0700
@@ -1572,7 +1572,7 @@
                 lda ,x+                         ; get character
                 bra tokenize2                   ; stash it and continue
 tokenize11      ldx ,s                          ; get back start of input token
-                lda #-1                         ; initilize match length (-1 to compensate for inca below)
+                clra                            ; initalize match length counter
 tokenize12      inca                            ; bump length counter
                 ldb ,x+                         ; get input character
                 cmpb #'z                        ; is it above lower case Z?