4 ms·
> memchr() returns the first occurrence of the byte 0 (your second argument), or NULL. ...What if the first byte is 0? That would cause the if condition to fai
by skykooler 9y ago
> memchr() returns the first occurrence of the byte 0 (your second argument), or NULL.
...What if the first byte is 0? That would cause the if condition to fail, and the output would be treated as plain text.
- burntsushi 9y agomemchr returns a pointer, not an offset.
- skykooler 9y agoAh, that explains it.