shithub: riscv

Download patch

ref: ce17224eaf159e48b4cbb40c437bb2b3e008ca9e
parent: 5fb666453a7b0457ae0ba97bccfab04899058568
author: aiju <devnull@localhost>
date: Thu May 25 20:01:53 EDT 2017

?a: getc() needs to increment lineno if it gets \n from peekc

--- a/sys/src/cmd/cc/lexbody
+++ b/sys/src/cmd/cc/lexbody
@@ -458,6 +458,8 @@
 	c = peekc;
 	if(c != IGN) {
 		peekc = IGN;
+		if(c == '\n')
+			lineno++;
 		return c;
 	}
 	c = GETC();