From 992215ee918ac87d397a3f87c8f6ae66039ce132 Mon Sep 17 00:00:00 2001 From: deepend Date: Sun, 25 Jan 2026 19:09:17 -0700 Subject: [PATCH] Fix invalid call to g_io_channel_set_buffered --- src/common/util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 49613f51..4f1023d9 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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;