mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
need to initialize flags for pooled strings; close #1768
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user