diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-18 18:22:42 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-18 18:22:42 -0700 |
commit | 73c04db73163d1d2719bb97a6b8c133065df75c3 (patch) | |
tree | 781103cac8053e73aaa81b9aa773ced4093d8d37 /sys/libn/bufio.c | |
parent | 23ac1f4f98accc3bb84e81be264d8408be372028 (diff) |
feat: macro expansion and constant evaluation prototype
Diffstat (limited to 'sys/libn/bufio.c')
-rw-r--r-- | sys/libn/bufio.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |