summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream.c b/stream.c
index 60247af7..e9ba359b 100644
--- a/stream.c
+++ b/stream.c
@@ -719,6 +719,7 @@ static val stdio_unget_byte(val stream, int byte)
{
struct stdio_handle *h = coerce(struct stdio_handle *, stream->co.handle);
+ errno = 0;
return h->f != 0 && ungetc(byte, coerce(FILE *, h->f)) != EOF
? num_fast(byte)
: stdio_maybe_error(stream, lit("pushing back byte into"));