diff options
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index f777d7630b..f9ab9abfa0 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -1344,7 +1344,7 @@ static VALUE cParser_parse(JSON_ParserConfig *config, VALUE Vsource) JSON_ParserState _state = { .config = config, .cursor = RSTRING_PTR(Vsource), - .end = RSTRING_PTR(Vsource) + RSTRING_LEN(Vsource), + .end = RSTRING_END(Vsource), .stack = &stack, }; JSON_ParserState *state = &_state; |