git: 9front

Download patch

ref: 550c3e9f2f5024f5e1810a4b412af1502dd4ed34
parent: cda3590107e655a33ab23f74674747ba0d1f9404
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();
--