From 73c04db73163d1d2719bb97a6b8c133065df75c3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Mon, 18 May 2020 18:22:42 -0700 Subject: feat: macro expansion and constant evaluation prototype --- sys/libn/bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/libn/bufio.c') diff --git a/sys/libn/bufio.c b/sys/libn/bufio.c index 05b6068..cde56b7 100644 --- a/sys/libn/bufio.c +++ b/sys/libn/bufio.c @@ -75,8 +75,8 @@ getbyte: error bufio·ungetbyte(io·Buffer *buf, byte c) { - buf->state ^= bufio·end; - if (buf->state & bufio·rdr) { + buf->state &= ~bufio·end; + if (!(buf->state & bufio·rdr)) { errorf("attempted to unget on non-active reader"); return bufio·err; } -- cgit v1.2.1