mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Merge pull request #1183 from ailin-nemui/glib-2-63
manually handle NUL unicode in g_utf8_get_next_char_validated
This commit is contained in:
commit
76802985a4
@ -672,7 +672,11 @@ void term_stop(void)
|
||||
|
||||
static int input_utf8(const unsigned char *buffer, int size, unichar *result)
|
||||
{
|
||||
unichar c = g_utf8_get_char_validated((char *)buffer, size);
|
||||
unichar c = g_utf8_get_char_validated((char *) buffer, size);
|
||||
|
||||
/* GLib >= 2.63 do not accept Unicode NUL anymore */
|
||||
if (c == (unichar) -2 && *buffer == 0 && size > 0)
|
||||
c = 0;
|
||||
|
||||
switch (c) {
|
||||
case (unichar)-1:
|
||||
|
Loading…
Reference in New Issue
Block a user