mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #392 from monaka/pr-use-memcpy-instead-of-strncpy
Use memcpy instead of strncpy
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user