From 78f2902c0680f53dc2cf4b7febce1d3613db67bf Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 1 Mar 2014 10:48:22 +0900 Subject: need to initialize flags for pooled strings; close #1768 --- src/state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state.c b/src/state.c index 620ed7d77..9b7ad1c5a 100644 --- a/src/state.c +++ b/src/state.c @@ -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); -- cgit v1.2.3