Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
voidUpdate
· 6mo ago · 0 comments
you could check if ret > ret * 10 + characters[i]-48, if so it has wrapped around and you return an error
Comments
[–]
thomashabets2
6mo ago
For unsigned that could work, but signed overflow is UB.