diff options
author | aiju <devnull@localhost> | 2017-05-26 00:01:53 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2017-05-26 00:01:53 +0000 |
commit | ce17224eaf159e48b4cbb40c437bb2b3e008ca9e (patch) | |
tree | 4fc60dd7cfebfe480df6fc9976d852b25fdea546 | |
parent | 5fb666453a7b0457ae0ba97bccfab04899058568 (diff) | |
download | plan9front-ce17224eaf159e48b4cbb40c437bb2b3e008ca9e.tar.xz |
?a: getc() needs to increment lineno if it gets \n from peekc
-rw-r--r-- | sys/src/cmd/cc/lexbody | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/cc/lexbody b/sys/src/cmd/cc/lexbody index 48c5ed19e..a22c6efba 100644 --- a/sys/src/cmd/cc/lexbody +++ b/sys/src/cmd/cc/lexbody @@ -458,6 +458,8 @@ getc(void) c = peekc; if(c != IGN) { peekc = IGN; + if(c == '\n') + lineno++; return c; } c = GETC(); |