• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

修订版c9b7cee2f6b0cf7029237444da819d0783ea78ba (tree)
时间2014-07-12 20:36:44
作者cremno <cremno@mail...>
CommiterYukihiro "Matz" Matsumoto

Log Message

check mrb_open return value

更改概述

差异

--- a/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
+++ b/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
@@ -96,6 +96,10 @@ main(int argc, char **argv)
9696 }
9797
9898 mrb = mrb_open();
99+ if (mrb == NULL) {
100+ fputs("Invalid mrb_state, exiting mruby-strip\n", stderr);
101+ return EXIT_FAILURE;
102+ }
99103
100104 ireps = (mrb_irep**)malloc(sizeof(mrb_irep*) * argc);
101105 for (i = args_result; i < argc; ++i) {