summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cpp/cpp.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-07-11 13:28:58 -0700
committerOri Bernstein <ori@eigenstate.org>2020-07-11 13:28:58 -0700
commit1987cc69c8c2f071762da025a84903dcc8197855 (patch)
treea907daac5c257059a7eacaecf8b918391aa318a5 /sys/src/cmd/cpp/cpp.h
parentad26dc48a6dc05da02f96e5f1e7b82de58ff5b2c (diff)
downloadplan9front-1987cc69c8c2f071762da025a84903dcc8197855.tar.xz
stdio, ape/stdio: fix order of operations in putc
When calling putc, we need to return either EOF or the character returned. To distinguish the two, we need to avoid sign extending 0xff. The code attempted to do this, but the order of operations was wrong, so we ended up masking, setting a character, and then sign extending the character. This fixes things so we mask after assignment.
Diffstat (limited to 'sys/src/cmd/cpp/cpp.h')
0 files changed, 0 insertions, 0 deletions