mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02: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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue