diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-15 08:07:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-15 08:07:35 +0000 |
commit | 3eac78dd88982c2f1388d7a974c58ed5d2214e12 (patch) | |
tree | 4d70ee34ceee8b4e5ffaaabba8a6ef10a5f89173 /iseq.c | |
parent | 5caf681291e48b6c89ae3458c595745831c6b3fd (diff) |
iseq.c: fix values for true
* 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
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |