diff --git a/mjit.c b/mjit.c index c5fb709d92..5668b1a6e9 100644 --- a/mjit.c +++ b/mjit.c @@ -1137,7 +1137,8 @@ convert_unit_to_func(struct rb_mjit_unit *unit) #else /* splitting .c -> .o step and .o -> .so step, to cache .o files in the future */ if (success = compile_c_to_o(c_file, o_file)) { - const char *o_files[] = { o_file, NULL }; + const char *o_files[2] = { NULL, NULL }; + o_files[0] = o_file; success = link_o_to_so(o_files, so_file); /* Alwasy set o_file for compaction. The value is also used for lazy deletion. */