]> git.sesse.net Git - plocate/commit
Work around brokenness in FreeBSD mbtowc().
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 31 Oct 2020 11:25:36 +0000 (12:25 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 31 Oct 2020 11:25:36 +0000 (12:25 +0100)
commit355ab0d214ee0f08fb44ebeafd70d5e93db84c10
tree040e19e726c10fbc308225db8bbe2fd665cad4a6
parent73974b9b3e3deb6051fc01c0ea54b11530a90ee1
Work around brokenness in FreeBSD mbtowc().

The manpage claims the return value should be 0 on a null byte,
just like on Linux, but in practice, it returns -1, so we need to
check for end-of-string manually.
serializer.cpp