Skip to content

Commit ab4ab7c

Browse files
committed
Fix compile error by #3309
1 parent 61ac564 commit ab4ab7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/array.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,12 @@ mrb_ary_s_create(mrb_state *mrb, mrb_value self)
244244
static void
245245
ary_concat(mrb_state *mrb, struct RArray *a, struct RArray *a2)
246246
{
247+
mrb_int len;
248+
247249
if (a2->len > ARY_MAX_SIZE - a->len) {
248250
mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
249251
}
250-
mrb_int len = a->len + a2->len;
252+
len = a->len + a2->len;
251253

252254
ary_modify(mrb, a);
253255
if (a->aux.capa < len) {

0 commit comments

Comments
 (0)