From dccd1db48ed145a371a2f9e21e109e86f04be379 Mon Sep 17 00:00:00 2001 From: goerch Date: Mon, 2 Oct 2023 09:19:06 +0200 Subject: [PATCH] Update unicode.h Co-authored-by: Georgi Gerganov --- unicode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unicode.h b/unicode.h index e4bd2b9da..ce3a4044b 100644 --- a/unicode.h +++ b/unicode.h @@ -293,8 +293,9 @@ static uint32_t codepoint_from_utf8(const std::string& utf8, size_t& offset) { static std::vector codepoints_from_utf8(const std::string& utf8) { std::vector result; size_t offset = 0; - while (offset < utf8.size()) + while (offset < utf8.size()) { result.push_back(codepoint_from_utf8(utf8, offset)); + } return result; }