summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index eab982b75f..70d77e1429 100644
--- a/parse.y
+++ b/parse.y
@@ -4877,11 +4877,11 @@ parser_yyerror(struct parser_params *parser, const char *msg)
if (len > max_line_margin * 2 + 10) {
if (lex_p - p > max_line_margin) {
- p = rb_enc_prev_char(p, lex_p - max_line_margin, rb_enc_get(lex_lastline));
+ p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
pre = "...";
}
if (pe - lex_p > max_line_margin) {
- pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, rb_enc_get(lex_lastline));
+ pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
post = "...";
}
len = pe - p;