Specify the size of struct RStringEmbed array part.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-06-15 23:36:53 +09:00
parent 0f978932e2
commit 9debf63340
+1 -1
View File
@@ -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)