From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by bl2.djc.id.au (Postfix, from userid 1000) id DD8DA29BBCB; Sat, 17 Oct 2026 11:24:58 +1100 (AEDT) Date: Sat, 17 Oct 2026 11:25:01 +1100 To: sup-commits@supmua.dev Subject: [ncursesw-ruby.git] 03/10: fix wrong argument handling in mvwgetch() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Reply-To: Dan Callaghan In-Reply-To: <179219669847.381480.6906705364727468632@bl2.djc.id.au> References: <179219669847.381480.6906705364727468632@bl2.djc.id.au> Thread-Index: AQAAEjRW1ch74naHRnKg4xL7js+6AQ== X-Git-Host: bl2.djc.id.au X-Git-Repo: ncursesw-ruby.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 4e4c03b8b720253a90fb6298a8b7857571f8c60d X-Git-NotificationType: diff X-Git-Multimail-Version: 1.7.dev Auto-Submitted: auto-generated Message-Id: <20261017002458.DD8DA29BBCB@bl2.djc.id.au> From: Dan Callaghan List-Id: New commit on branch master: https://supmua.dev/git/ncursesw-ruby/commit/4e4c03b8b720253a90fb6298a8b7857571f8c60d.html commit 4e4c03b8b720253a90fb6298a8b7857571f8c60d Author: Dan Callaghan AuthorDate: Thu Oct 8 21:16:08 2026 +1100 fix wrong argument handling in mvwgetch() --- ncurses_wrap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ncurses_wrap.c b/ncurses_wrap.c index e511a4e..7325390 100644 --- a/ncurses_wrap.c +++ b/ncurses_wrap.c @@ -1246,10 +1246,10 @@ static VALUE rbncurs_mvwchgat(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3, V static VALUE rbncurs_mvwdelch(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { return INT2NUM(mvwdelch(get_window(arg1), NUM2INT(arg2), NUM2INT(arg3))); } -static VALUE rbncurs_mvwgetch(VALUE dummy, VALUE arg1, VALUE arg2, VALUE arg3) { - WINDOW * c_win = get_window(arg1); - int windelay = NUM2INT(rb_iv_get(arg1, "@timeout")); - if (wmove(c_win, NUM2INT(arg1), NUM2INT(arg2)) == ERR) +static VALUE rbncurs_mvwgetch(VALUE dummy, VALUE rb_win, VALUE rb_y, VALUE rb_x) { + WINDOW * c_win = get_window(rb_win); + int windelay = NUM2INT(rb_iv_get(rb_win, "@timeout")); + if (wmove(c_win, NUM2INT(rb_y), NUM2INT(rb_x)) == ERR) return INT2NUM(ERR); return INT2NUM(rbncurshelper_nonblocking_wgetch(c_win, windelay)); }