Skip to content

Commit

Permalink
iseq.c: fix values for true
Browse files Browse the repository at this point in the history
* iseq.c (make_compile_option): fill with 1 of int, not char if opt is true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 15, 2013
1 parent 5caf681 commit 3eac78d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ make_compile_option(rb_compile_option_t *option, VALUE opt)
*option = COMPILE_OPTION_FALSE;
}
else if (opt == Qtrue) {
memset(option, 1, sizeof(rb_compile_option_t));
int i;
for (i = 0; i < (int)(sizeof(rb_compile_option_t) / sizeof(int)); ++i)
((int *)option)[i] = 1;
}
else if (CLASS_OF(opt) == rb_cHash) {
*option = COMPILE_OPTION_DEFAULT;
Expand Down

0 comments on commit 3eac78d

Please sign in to comment.