changeset 20:0b3b4daa0d92

Fix off by one when detecting if line input buffer full
author William Astle <lost@l-w.ca>
date Tue, 08 Nov 2022 22:10:35 -0700
parents 20fa3242c6a5
children 2264569d7aca
files src/lwbasic.s
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lwbasic.s	Tue Nov 08 22:09:48 2022 -0700
+++ b/src/lwbasic.s	Tue Nov 08 22:10:35 2022 -0700
@@ -841,7 +841,7 @@
                 bsr readlines                   ; stash character in buffer and echo if necessary
                 bra readline0                   ; go get another character
 readlines       cmpx #linebuff+linebuffsize-1   ; is the line buffer full?
-                bhi readlinee0                  ; brif so - don't store character OR echo it
+                bhs readlinee0                  ; brif so - don't store character OR echo it
                 sta ,x+                         ; stash character
 readlinee       ldb readlinenoecho              ; are we echoing?
                 bne readlinee0                  ; brif not