[PRISM] Use RSTRING_LEN for Prism stream parsing
This commit is contained in:
parent
278bbd7b45
commit
7de2c06352
@ -10485,7 +10485,7 @@ pm_parse_stdin_fgets(char *string, int size, void *stream)
|
||||
}
|
||||
|
||||
const char *cstr = StringValuePtr(line);
|
||||
long length = rb_str_strlen(line);
|
||||
long length = RSTRING_LEN(line);
|
||||
|
||||
memcpy(string, cstr, length);
|
||||
string[length] = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user