sheredom / utf8.h

📚 single header utf8 string functions for C and C++
The Unlicense
1.74k stars 127 forks source link

Two NULs copied to dst when copying "" using utf8cpy #3

Closed fluks closed 8 years ago

fluks commented 8 years ago

If the src argument to utf8cpy is "", the empty string, '\0' is assigned twice to dst, once in the loop and the second time after it.

I believe this is not the intended behavior of this function.

sheredom commented 8 years ago

Good find thanks!