libluna: Fix UTF-8 encoding

This commit is contained in:
apio 2023-04-28 19:59:40 +02:00
parent 80914f0bb9
commit b4a5aff071
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -35,6 +35,7 @@ static Result<bool> encode_wide_char_as_utf8(wchar_t c, char* result, usize& len
const usize utf8_len = TRY(wide_char_length_as_utf8(c));
if (utf8_len > len) { return false; } // Not enough space
len = utf8_len;
u8* buf = (u8*)result;