mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
should initialize shared->buf as well as s->buf
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user