git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d878b8
)
lib: add comment in utf8_to_utf32_stream()
author
Heinrich Schuchardt
<heinrich.schuchardt@canonical.com>
Thu, 18 Jan 2024 17:54:50 +0000
(18:54 +0100)
committer
Tom Rini
<trini@konsulko.com>
Wed, 24 Jan 2024 21:17:14 +0000
(16:17 -0500)
The logic of utf8_to_utf32_stream() is not easy to understand.
Add a comment.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/charset.c
patch
|
blob
|
history
diff --git
a/lib/charset.c
b/lib/charset.c
index
89057ef
..
2b43175
100644
(file)
--- 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;
}
}