From 3eac78dd88982c2f1388d7a974c58ed5d2214e12 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 Nov 2013 08:07:35 +0000 Subject: 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 --- iseq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 504e96be1e..2db1d3be56 100644 --- a/iseq.c +++ b/iseq.c @@ -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; -- cgit v1.2.3