From 179e30b2feebd5feb1ba7359ffb226146c11186c Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sun, 13 Nov 2005 05:55:32 +0000 Subject: [PATCH] X11 typo From a bug report: fix a typo for mouse position handling in set_button_values(). I have no way to test this, nor can I tell whether it could have ever impacted anyone. The old code clearly had a mistake and the fix is obvious. --- doc/fixes34.4 | 2 ++ win/X11/winmap.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 536822cbc..6c9ff8c45 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -167,6 +167,8 @@ unix: remove use of parentheses in nethack man page usage that confused a winCE: disable processing of double-click messages if the first click causes map to scroll X11: ensure vertical scrollbar shows up in text display windows +X11: fix typo in mouse click sanity check; result might have pointed to + spurious location after window resizing General New Features diff --git a/win/X11/winmap.c b/win/X11/winmap.c index 9d71dd9c6..27b7d5924 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)winmap.c 3.5 1996/04/05 */ +/* SCCS Id: @(#)winmap.c 3.5 2005/11/12 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1105,7 +1105,7 @@ set_button_values(w, x, y, button) /* The values can be out of range if the map window has been resized */ /* to be larger than the max size. */ if (click_x >= COLNO) click_x = COLNO-1; - if (click_y >= ROWNO) click_x = ROWNO-1; + if (click_y >= ROWNO) click_y = ROWNO-1; /* Map all buttons but the first to the second click */ click_button = (button == Button1) ? CLICK_1 : CLICK_2; -- 2.40.0