?a: getc() needs to increment lineno if it gets \n from peekc
This commit is contained in:
parent
5fb666453a
commit
ce17224eaf
1 changed files with 2 additions and 0 deletions
|
@ -458,6 +458,8 @@ getc(void)
|
||||||
c = peekc;
|
c = peekc;
|
||||||
if(c != IGN) {
|
if(c != IGN) {
|
||||||
peekc = IGN;
|
peekc = IGN;
|
||||||
|
if(c == '\n')
|
||||||
|
lineno++;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
c = GETC();
|
c = GETC();
|
||||||
|
|
Loading…
Reference in a new issue