diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-07-21 16:17:53 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-07-21 16:17:53 +0200 |
commit | 9dd3942c88b79bd9f64fd497bf8dd21ed7794c66 (patch) | |
tree | 377693e3898331ffd5599612442e8ac781153f4c /src/common | |
parent | 92cb1dc12ccc9f20944bf63826d0c98144dd65b2 (diff) |
Minor cosmetics for util.c too
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 8a8adf02..35c768d2 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -399,8 +399,11 @@ waitline2 (GIOChannel *source, char *buf, int bufsize) { 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; + } if (buf[i] == '\n' || bufsize == i + 1) { buf[i] = 0; |