Skip to content

Commit c54f3bc

Browse files
committed
Fixed setting of active_char for strings
1 parent 5e2472a commit c54f3bc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

parser/scanner.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ int xx_get_token(xx_scanner_state *s, xx_scanner_token *token) {
503503
token->opcode = XX_T_STRING;
504504
token->value = estrndup(start, YYCURSOR - start - 1);
505505
token->len = YYCURSOR - start - 1;
506-
s->active_char += (YYCURSOR - start + 1);
506+
s->active_char += (YYCURSOR - start - 1);
507507
return 0;
508508
}
509509

tests/base/types.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ array(2) {
346346
["line"]=>
347347
int(19)
348348
["char"]=>
349-
int(17)
349+
int(15)
350350
}
351351
["file"]=>
352352
string(%d) "%s/tests/data/base/types.zep"

tests/operators/assignments/concat.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ array(3) {
4040
["line"]=>
4141
int(8)
4242
["char"]=>
43-
int(14)
43+
int(12)
4444
}
4545
["file"]=>
4646
string(%d) "%s"
4747
["line"]=>
4848
int(8)
4949
["char"]=>
50-
int(14)
50+
int(12)
5151
}
5252
}
5353
["file"]=>
@@ -82,14 +82,14 @@ array(3) {
8282
["line"]=>
8383
int(9)
8484
["char"]=>
85-
int(14)
85+
int(12)
8686
}
8787
["file"]=>
8888
string(%d) "%s"
8989
["line"]=>
9090
int(9)
9191
["char"]=>
92-
int(14)
92+
int(12)
9393
}
9494
}
9595
["file"]=>

0 commit comments

Comments
 (0)