aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-18 18:54:50 +0100
committerTom Rini <trini@konsulko.com>2024-01-24 11:12:12 -0500
commit815bb96438204ebca52e07c5e701c10d8d257dcb (patch)
treec072bf4794c6f56701c6581c1377da9990442712
parentb7dd2d48c234a3b384ed102feb8009e540951130 (diff)
downloadu-boot-815bb96438204ebca52e07c5e701c10d8d257dcb.zip
u-boot-815bb96438204ebca52e07c5e701c10d8d257dcb.tar.gz
u-boot-815bb96438204ebca52e07c5e701c10d8d257dcb.tar.bz2
lib: add comment in utf8_to_utf32_stream()
The logic of utf8_to_utf32_stream() is not easy to understand. Add a comment. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--lib/charset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/charset.c b/lib/charset.c
index 89057ef..2b43175 100644
--- a/lib/charset.c
+++ b/lib/charset.c
@@ -570,6 +570,10 @@ int utf8_to_utf32_stream(u8 c, char *buffer)
}
if (pos == end)
return 0;
+ /*
+ * Appending the byte lead to an invalid UTF-8 byte sequence.
+ * Consider it as the start of a new code sequence.
+ */
*buffer = 0;
}
}