mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3054 from kazuho/kazuho/adjust-column-offset-in-peekc_n
fix miscalculation of column number in `peekc_n`
This commit is contained in:
@@ -3473,6 +3473,7 @@ peekc_n(parser_state *p, int n)
|
||||
do {
|
||||
c0 = nextc(p);
|
||||
if (c0 == -1) return c0; /* do not skip partial EOF */
|
||||
if (c0 >= 0) --p->column;
|
||||
list = push(list, (node*)(intptr_t)c0);
|
||||
} while(n--);
|
||||
if (p->pb) {
|
||||
|
||||
Reference in New Issue
Block a user