summaryrefslogtreecommitdiff
path: root/ext/io/console/console.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-04 06:10:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-04 06:10:12 +0000
commit523292d61294d4496c593ad530eb520b469c0f02 (patch)
treed173bb65cb6d09be709fc2507467543f08cf2c01 /ext/io/console/console.c
parent4cb4c929df1ed1b86f3aec90ff7cb954db9a9021 (diff)
console.c: initialize
* ext/io/console/console.c (rawmode_opt): initialize options for the case all options are not given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r--ext/io/console/console.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index 61b31258e67..f614c68a269 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -105,6 +105,8 @@ rawmode_opt(int argc, VALUE *argv, rawmode_arg_t *opts)
if (!NIL_P(vopts)) {
VALUE vmin = rb_hash_aref(vopts, ID2SYM(rb_intern("min")));
VALUE vtime = rb_hash_aref(vopts, ID2SYM(rb_intern("time")));
+ opts->vmin = 0;
+ opts->vtime = 0;
if (!NIL_P(vmin)) {
opts->vmin = NUM2INT(vmin);
optp = opts;