diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-15 23:36:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:13 +0900 |
| commit | 9debf633408acbf6c58ff5660907b1b4b76142ab (patch) | |
| tree | f86c6aad55801182c977350ee4ce35f9d5859a45 /include | |
| parent | 0f978932e2e73d7ed3460e349d739d9fb7f8d084 (diff) | |
| download | mruby-9debf633408acbf6c58ff5660907b1b4b76142ab.tar.gz mruby-9debf633408acbf6c58ff5660907b1b4b76142ab.zip | |
Specify the size of `struct RStringEmbed` array part.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h index 0f1b762c1..81b1c0ed1 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -35,7 +35,7 @@ struct RString { }; struct RStringEmbed { MRB_OBJECT_HEADER; - char ary[]; + char ary[RSTRING_EMBED_LEN_MAX+1]; }; #define RSTR_SET_TYPE_FLAG(s, type) (RSTR_UNSET_TYPE_FLAG(s), (s)->flags |= MRB_STR_##type) |
