Closed JerrySievert closed 9 years ago
i'd still recommend checking for the validity of the pointer for 0 or pointer overflows, just to be safe, then checking against *buffer
or as you'd like buffer[0]
(both amount to the same thing, but are coding style).
i'll happily change the second part if you'd prefer.
Sounds good, change the style to be more consistent with the rest of the code and I'll take it. I doubt the one extra null check will hurt any real performance.
to reproduce the issue:
before the change, an error trying to parse an empty string (NULL), after the change, expected behavior.