From 6c2c5540e2cb549579836d9a80417b18a296344c Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Sun, 3 Jun 2012 09:09:40 +0900 Subject: should initialize shared->buf as well as s->buf --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/string.c b/src/string.c index 6d37597d8..8bc299987 100644 --- a/src/string.c +++ b/src/string.c @@ -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; -- cgit v1.2.3