Hacker News new | ask | show | jobs
by voidUpdate 27 days ago
you could check if ret > ret * 10 + characters[i]-48, if so it has wrapped around and you return an error
1 comments

For unsigned that could work, but signed overflow is UB.