diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-01 10:48:22 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-03-01 10:48:22 +0900 |
| commit | 78f2902c0680f53dc2cf4b7febce1d3613db67bf (patch) | |
| tree | 8a5f36f8e3c24d15e6edbed35e62930011433543 /src | |
| parent | 5fb8fa5a81566356b6bf9c4410853b77f9d02570 (diff) | |
| download | mruby-78f2902c0680f53dc2cf4b7febce1d3613db67bf.tar.gz mruby-78f2902c0680f53dc2cf4b7febce1d3613db67bf.zip | |
need to initialize flags for pooled strings; close #1768
Diffstat (limited to 'src')
| -rw-r--r-- | src/state.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |
