sprintf/vsprintf should write a terminating null character even if the string produced is empty.
They were just not writing anything in this case.
This commit is contained in:
parent
6006cefc70
commit
8562842f66
16
stdio.asm
16
stdio.asm
|
@ -2662,6 +2662,14 @@ sprintf start
|
|||
plb
|
||||
plx remove the return address
|
||||
ply
|
||||
phd initialize output to empty string
|
||||
tsc
|
||||
tcd
|
||||
short M
|
||||
lda #0
|
||||
sta [3]
|
||||
long M
|
||||
pld
|
||||
pla save the stream
|
||||
sta string
|
||||
pla
|
||||
|
@ -3143,6 +3151,14 @@ vsprintf start
|
|||
plb
|
||||
plx remove the return address
|
||||
ply
|
||||
phd initialize output to empty string
|
||||
tsc
|
||||
tcd
|
||||
short M
|
||||
lda #0
|
||||
sta [3]
|
||||
long M
|
||||
pld
|
||||
pla save the stream
|
||||
sta string
|
||||
pla
|
||||
|
|
Loading…
Reference in New Issue