Commit 9760b7f1 authored by Frank Celler's avatar Frank Celler

simple fix for underflow

parent fc125524
......@@ -2976,17 +2976,18 @@ nextc(parser_state *p)
c = *p->s++;
}
if (c == '\n') {
if (p->nerr < 1) {
if (p->column < 0) {
p->column++; // pushback caused an underflow
}
else {
p->lineno++;
p->column = 0;
}
// must understand heredoc
}
else {
if (p->nerr < 1) {
p->column++;
}
}
return c;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment