diff options
Diffstat (limited to 'sys/libn/bufio.c')
-rw-r--r-- | sys/libn/bufio.c | 5 |
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; } |