Fix invalid call to g_io_channel_set_buffered

This commit is contained in:
2026-01-25 19:09:17 -07:00
parent 2b98ebc544
commit 992215ee91

View File

@@ -214,11 +214,13 @@ waitline2 (GIOChannel *source, char *buf, int bufsize)
gsize len;
GError *error = NULL;
if (g_io_channel_get_buffered (source))
{
g_io_channel_set_encoding (source, NULL, &error);
g_io_channel_set_buffered (source, FALSE);
}
while (1)
{
g_io_channel_set_buffered (source, FALSE);
g_io_channel_set_encoding (source, NULL, &error);
if (g_io_channel_read_chars (source, &buf[i], 1, &len, &error) != G_IO_STATUS_NORMAL)
{
return -1;