commit 959723aaf0aeddbe454d0d69b52e88161fc3e374
parent 636dacd94fa0a560c44dcfeea767e46c29f58d9f
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Wed, 1 May 2013 15:09:54 +0200
ncurses_wrap.c: make sure y and x are initialized
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ncurses_wrap.c b/ncurses_wrap.c
@@ -2349,7 +2349,8 @@ static VALUE rbncurs_getparyx(VALUE dummy, VALUE rb_win, VALUE rb_y, VALUE rb_x)
}
static VALUE rbncurs_getsyx(VALUE dummy, VALUE rb_y, VALUE rb_x)
{
- int y,x;
+ int y = 0;
+ int x = 0;
if ((rb_obj_is_instance_of(rb_y, rb_cArray) != Qtrue)
|| (rb_obj_is_instance_of(rb_x, rb_cArray) != Qtrue)) {
rb_raise(rb_eArgError,