mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-06-14 03:29:41 +00:00
strtoul: return 0 when given an empty string, as required by the C standards.
The issue was introduced in commit 6e9790667
.
errno is now set to EINVAL in this case. (This is not required by the C standards, but is consistent with various other implementations.)
This fixes the cases in #23 related to strtol() and strtoul().
This commit is contained in:
parent
7a20f5f71d
commit
571c601b66
|
@ -926,6 +926,9 @@ cn4 inc4 str next char
|
|||
|
||||
cn5 lda foundOne if no digits were found, flag the error
|
||||
bne rt1
|
||||
lda #EINVAL
|
||||
sta >errno
|
||||
bra rt2
|
||||
;
|
||||
; flag an error
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue
Block a user