aboutsummaryrefslogtreecommitdiff
path: root/sys/libn/bufio.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-19 19:12:10 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-19 19:12:10 -0700
commitb779c6f7d73e5f70b2d886ed75e6e65217ad1e85 (patch)
tree480864b08c5242cf7c9de7d47c56f66e240948a5 /sys/libn/bufio.c
parent13772a8a2120017981d280bfe120fdbb74f27860 (diff)
checkin: found a large bug associated to ident resetting the buffer vector
Diffstat (limited to 'sys/libn/bufio.c')
-rw-r--r--sys/libn/bufio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/libn/bufio.c b/sys/libn/bufio.c
index 9bca46a..0a3c419 100644
--- a/sys/libn/bufio.c
+++ b/sys/libn/bufio.c
@@ -53,6 +53,11 @@ refill(io·Buffer *buf)
buf->pos = buf->beg;
buf->end = buf->pos + n;
+ // TEST: put a physical EOF byte at the end
+ // this would allow for an unget operation
+ if (n < buf->size)
+ *buf->end++ = EOF;
+
return n;
}