Merge pull request #2653 from frotzer/fixeof
Fix Atari buffer overrun on keyboard EOF
This commit is contained in:
@@ -147,6 +147,7 @@ icbll_copy:
|
|||||||
sta dataptr+1
|
sta dataptr+1
|
||||||
lda ICBLL,x
|
lda ICBLL,x
|
||||||
sta copylen
|
sta copylen
|
||||||
|
beq copied ; length = 0 if EOF
|
||||||
pha ; remember for return value
|
pha ; remember for return value
|
||||||
ldy #0
|
ldy #0
|
||||||
ldx index
|
ldx index
|
||||||
@@ -159,7 +160,7 @@ copy: lda linebuf,x
|
|||||||
bne copy
|
bne copy
|
||||||
|
|
||||||
pla ; length
|
pla ; length
|
||||||
pha ; save length to return at okdone
|
copied: pha ; save length to return at okdone
|
||||||
|
|
||||||
clc
|
clc
|
||||||
adc index
|
adc index
|
||||||
|
|||||||
Reference in New Issue
Block a user