Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
voidUpdate
1mo ago
0 comments
Save
Share
you could check if ret > ret * 10 + characters[i]-48, if so it has wrapped around and you return an error
0 comments
1 comments · 1 top-level
top
newest
oldest
thomashabets2
1mo ago
For unsigned that could work, but signed overflow is UB.
j
/
k
navigate · click thread line to collapse