4 ms·
What's the problem with strtoul? Just make sure to pass 10 as the third parameter, not 0.
by boring_twenties 6y ago
What's the problem with strtoul? Just make sure to pass 10 as the third parameter, not 0.
- mywittyname 6y agoMaybe the punishment in hell should be to RTFM for the rest of eternity.
- boring_twenties 6y agoSorry, what? It's not like it's a default parameter, you would have to explicitly pass zero if you want the "guess base based on prefix" behavior.
- Leherenn 6y agoError handling is pretty horrible. And also it happily accepts negative values.