Skip to content

avatar: fix invalid UTF-8 iteration

Christian Hergert requested to merge wip/chergert/fix-avatar-gcc-warning into main

This branch doesn't do what it looks like it is because g_utf8_next_char() will always return a pointer if q is valid (it just might dereference to \0 if it's at the end of the string).

Instead, just allow dereference to the trailing \0 byte and check for a non-zero unichar so that it doesn't call g_string_append_unichar() with a zero byte.

Merge request reports