From 0b715510de5d8c5f293216d29a8dd653a08b2a18 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 28 Nov 2008 05:57:07 +0000 Subject: Bug 562393 – g_buffered_input_stream_read_byte broken if data available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-11-28 Matthias Clasen Bug 562393 – g_buffered_input_stream_read_byte broken if data available * gio/gbufferedinputstream.c (g_buffered_input_stream_read_byte): Fix handling of buffered content. Patch by Philip Withnall * gio/tests/buffered-input-stream.c: Add a testcase for this bug. * gio/tests/Makefile.am: And build it svn path=/trunk/; revision=7686 --- gio/gbufferedinputstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gio/gbufferedinputstream.c') diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c index 040ce3b38..4ffdff73e 100644 --- a/gio/gbufferedinputstream.c +++ b/gio/gbufferedinputstream.c @@ -878,7 +878,7 @@ g_buffered_input_stream_read_byte (GBufferedInputStream *stream, available = priv->end - priv->pos; - if (available < 1) + if (available != 0) { g_input_stream_clear_pending (input_stream); return priv->buffer[priv->pos++]; -- cgit v1.2.3