From b779c6f7d73e5f70b2d886ed75e6e65217ad1e85 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 19 May 2020 19:12:10 -0700 Subject: checkin: found a large bug associated to ident resetting the buffer vector --- sys/libn/bufio.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/libn/bufio.c') 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; } -- cgit v1.2.1