From 2025e78654ddd33e9aee7bcad23754f142936e38 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Fri, 9 Jan 2026 20:54:33 +0100 Subject: [PATCH] hotfix --- source/helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/helper.cpp b/source/helper.cpp index ef073fd..16dd905 100644 --- a/source/helper.cpp +++ b/source/helper.cpp @@ -150,7 +150,7 @@ CTRFF_API std::string ctrff::U16toU8(ctrff::u16 *in, size_t max) { } else if (c < 0x800) { result.push_back(static_cast(0xC0 | (c >> 6))); result.push_back(static_cast(0x80 | (c & 0x3F))); - } else if (c < 0xffff) { + } else if (c <= 0xffff) { result.push_back(static_cast(0xE0 | (c >> 12))); result.push_back(static_cast(0x80 | ((c >> 6) & 0x3F))); result.push_back(static_cast(0x80 | (c & 0x3F)));