Commit d0727be6 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #3054 from kazuho/kazuho/adjust-column-offset-in-peekc_n

fix miscalculation of column number in `peekc_n`
parents 2ca825a2 adadbf57
...@@ -3473,6 +3473,7 @@ peekc_n(parser_state *p, int n) ...@@ -3473,6 +3473,7 @@ peekc_n(parser_state *p, int n)
do { do {
c0 = nextc(p); c0 = nextc(p);
if (c0 == -1) return c0; /* do not skip partial EOF */ if (c0 == -1) return c0; /* do not skip partial EOF */
if (c0 >= 0) --p->column;
list = push(list, (node*)(intptr_t)c0); list = push(list, (node*)(intptr_t)c0);
} while(n--); } while(n--);
if (p->pb) { if (p->pb) {
......
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