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.
This commit is contained in:
nethack.rankin
2005-11-13 05:55:32 +00:00
parent c2e8fb61b8
commit 179e30b2fe
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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;