mrubyを超漢字で動作させる
修订版 | c9b7cee2f6b0cf7029237444da819d0783ea78ba (tree) |
---|---|
时间 | 2014-07-12 20:36:44 |
作者 | cremno <cremno@mail...> |
Commiter | Yukihiro "Matz" Matsumoto |
check mrb_open return value
@@ -96,6 +96,10 @@ main(int argc, char **argv) | ||
96 | 96 | } |
97 | 97 | |
98 | 98 | mrb = mrb_open(); |
99 | + if (mrb == NULL) { | |
100 | + fputs("Invalid mrb_state, exiting mruby-strip\n", stderr); | |
101 | + return EXIT_FAILURE; | |
102 | + } | |
99 | 103 | |
100 | 104 | ireps = (mrb_irep**)malloc(sizeof(mrb_irep*) * argc); |
101 | 105 | for (i = args_result; i < argc; ++i) { |