5 ms·
Can you double check the code? I just stared at the code snippets for five minutes and couldn't find a single error. The functions do assume the parameters are
by burntsushi 6y ago
Can you double check the code? I just stared at the code snippets for five minutes and couldn't find a single error.
The functions do assume the parameters are non-null pointers to NUL terminated strings, but that kind of assumption is pretty standard in C APIs. So other than that, I don't see any missing NULL check nor do I see the bug you refer to that occurs when there are no leading spaces.