Commit edee3f33 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #392 from monaka/pr-use-memcpy-instead-of-strncpy

Use memcpy instead of strncpy
parents 8b6f6faf d73a54d8
......@@ -339,7 +339,7 @@ sym_inspect(mrb_state *mrb, mrb_value sym)
memcpy(RSTRING(str)->ptr+1, name, len);
if (!symname_p(name) || strlen(name) != len) {
str = mrb_str_dump(mrb, str);
strncpy(RSTRING(str)->ptr, ":\"", 2);
memcpy(RSTRING(str)->ptr, ":\"", 2);
}
return str;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment