https://gitlab.synchro.net/main/sbbs/-/commit/88a7e14ecd5b55bfcca1f261
Modified Files:
src/encode/utf8.c utf8.h
Log Message:
Create utf8_strlcpy() which does a "safe" truncated-string copy
(doesn't leave a partial UTF-8 sequence at the end of the destination string).
This calls memcpy() for every char, which may not be performant, but I didn't (yet) do any profiling. Hence, no premature optimization either.
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net