]> granicus.if.org Git - nethack/commitdiff
X11 typo
authornethack.rankin <nethack.rankin>
Sun, 13 Nov 2005 05:55:32 +0000 (05:55 +0000)
committernethack.rankin <nethack.rankin>
Sun, 13 Nov 2005 05:55:32 +0000 (05:55 +0000)
     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
win/X11/winmap.c

index 536822cbcb8b737d96e332fec44f7ddfe4d23f1f..6c9ff8c4532703014384a8cc13c667051977d7ba 100644 (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
index 9d71dd9c6c2ef55d952ddb65fb4473eaaf737eb0..27b7d5924b4e33db5510ffec876b382168c5d43d 100644 (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;