Skip to content

Commit ec2fcc1

Browse files
committed
Always terminate lines with EOL in the editor.
It is safe to do always instead of only when the line length was 0, this ensures the editor never crashes on invalid input.
1 parent 7f73340 commit ec2fcc1

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/editor.bas

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,8 @@ PROC CopyToEdit
304304
if linLen > 255
305305
linLen = 255
306306
endif
307-
if linLen <> 0
308-
move ptr, EditBuf, linLen
309-
else
310-
poke EditBuf, $9b
311-
endif
307+
move ptr, EditBuf, linLen
308+
poke EditBuf + linLen, $9b
312309
ENDPROC
313310

314311
'-------------------------------------

0 commit comments

Comments
 (0)