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>
This commit is contained in:
Heinrich Schuchardt 2024-01-18 18:54:50 +01:00 committed by Tom Rini
parent 3d878b83d0
commit 3150da34c2

View File

@ -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;
}
}