Commit 6c2c5540 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

should initialize shared->buf as well as s->buf

parent 52fdeb02
......@@ -265,7 +265,7 @@ str_make_shared(mrb_state *mrb, mrb_value str)
shared->refcnt = 1;
if (s->aux.capa > s->len) {
shared->buf = mrb_realloc(mrb, shared->buf, s->len+1);
s->buf = shared->buf = mrb_realloc(mrb, s->buf, s->len+1);
}
else {
shared->buf = s->buf;
......
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