cpp-cheat icon indicating copy to clipboard operation
cpp-cheat copied to clipboard

str2int_errno str2int(int *out, char *s, int base) s cannot be NULL

Open amichalu opened this issue 5 years ago • 1 comments

str2int_errno str2int(int *out, char *s, int base) should check s against NULL value first

amichalu avatar May 28 '20 20:05 amichalu

I think I'd rather just let end users blow themselves up on UB if they break the API to avoid the overhead of an if :-)

cirosantilli avatar May 29 '20 08:05 cirosantilli