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

simple fix for underflow

parent fc125524
...@@ -2976,16 +2976,17 @@ nextc(parser_state *p) ...@@ -2976,16 +2976,17 @@ nextc(parser_state *p)
c = *p->s++; c = *p->s++;
} }
if (c == '\n') { if (c == '\n') {
if (p->nerr < 1) { if (p->column < 0) {
p->column++; // pushback caused an underflow
}
else {
p->lineno++; p->lineno++;
p->column = 0; p->column = 0;
} }
// must understand heredoc // must understand heredoc
} }
else { else {
if (p->nerr < 1) { p->column++;
p->column++;
}
} }
return c; 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