aboutsummaryrefslogtreecommitdiff
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index a7fb72e..5013e3f 100644
--- a/stream.c
+++ b/stream.c
@@ -142,7 +142,9 @@ char stream_next(stream_t *stream)
char stream_peek(stream_t *stream)
{
- if (stream_eos(stream))
+ // If we've reached end of stream, and end of content, there's really nothing
+ // to check here.
+ if (stream_eoc(stream) && stream_eos(stream))
return '\0';
switch (stream->type)