cmd/fsu: revert offset in error message
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
aaebb8f3ab
commit
be30e2f11e
@ -23,7 +23,7 @@ func parseUint32Fast(s string) (int, error) {
|
|||||||
for i, ch := range []byte(s) {
|
for i, ch := range []byte(s) {
|
||||||
ch -= '0'
|
ch -= '0'
|
||||||
if ch > 9 {
|
if ch > 9 {
|
||||||
return -1, fmt.Errorf("invalid character '%s' at index %d", string([]byte{ch}), i)
|
return -1, fmt.Errorf("invalid character '%s' at index %d", string(ch+'0'), i)
|
||||||
}
|
}
|
||||||
n = n*10 + int(ch)
|
n = n*10 + int(ch)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user