Commit 42c94ca3 authored by Christian Hergert's avatar Christian Hergert

input-stream: be more relaxed about end of file

When we fail to read a byte, we probably just reached the end
of the stream since we succeeded at reading-ahead above.
parent 8f8cde5a
......@@ -244,11 +244,9 @@ tmpl_token_input_stream_read_token (TmplTokenInputStream *self,
*/
ch = g_data_input_stream_read_byte (stream, cancellable, &local_error);
if ((ch == 0) && (local_error != NULL))
{
g_propagate_error (error, local_error);
return NULL;
}
/* Probably just end of file */
if (ch == 0)
return NULL;
/*
* Handle possible escaped \{.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment