diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-14 11:19:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-14 11:19:18 +0000 |
commit | 6b5e0bd98c3a807ab7708e775ac9b60a4f59e427 (patch) | |
tree | 5e86e7f6ac8258b53aaef567a416e7caac4fdd66 /string.c | |
parent | bbea0270272720d6b97fa74cf59d20eee9519aa8 (diff) | |
download | ruby-6b5e0bd98c3a807ab7708e775ac9b60a4f59e427.tar.gz |
exclude flexible array size with old compilers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6410,7 +6410,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc) if (CASEMAP_DEBUG) { fprintf(stderr, "Buffer allocation, capa is %"PRIuSIZE"\n", capa); /* for tuning */ } - current_buffer->next = xmalloc(sizeof(mapping_buffer) + capa); + current_buffer->next = xmalloc(offsetof(mapping_buffer, space) + capa); current_buffer = current_buffer->next; current_buffer->next = NULL; current_buffer->capa = capa; |