[ruby/json] Use RSTRING_END

https://github.com/ruby/json/commit/dd9c46c805
This commit is contained in:
Jean Boussier 2025-01-16 15:22:49 +01:00 committed by Hiroshi SHIBATA
parent e4b54b0a36
commit f664e863d8
Notes: git 2025-01-20 07:09:21 +00:00

View File

@ -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;