need to initialize flags for pooled strings; close #1768

parent 5fb8fa5a
......@@ -176,6 +176,7 @@ mrb_str_pool(mrb_state *mrb, mrb_value str)
ns->flags = MRB_STR_NOFREE;
}
else {
ns->flags = 0;
ns->ptr = (char *)mrb_malloc(mrb, (size_t)len+1);
if (s->ptr) {
memcpy(ns->ptr, s->ptr, len);
......
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