aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii1997-01-16 12:20:49 +0000
committerEli Zaretskii1997-01-16 12:20:49 +0000
commitbf8360aed29c9011653cfb65c61addcc3fa092ac (patch)
tree46c1e2d919d9ae0651122f1b042332d5ba70a638
parent090be653c38dbe456e536426f33568f8e4971ad9 (diff)
downloademacs-bf8360aed29c9011653cfb65c61addcc3fa092ac.tar.gz
emacs-bf8360aed29c9011653cfb65c61addcc3fa092ac.zip
* (XMenuActivate): Don't allow non-positive menu
coordinates.
-rw-r--r--src/msdos.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/msdos.c b/src/msdos.c
index d809fffd46a..c961be34656 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -2114,6 +2114,12 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
2114 /* Just in case we got here without a mouse present... */ 2114 /* Just in case we got here without a mouse present... */
2115 if (have_mouse <= 0) 2115 if (have_mouse <= 0)
2116 return XM_IA_SELECT; 2116 return XM_IA_SELECT;
2117 /* Don't allow non-positive x0 and y0, lest the menu will wrap
2118 around the display. */
2119 if (x0 <= 0)
2120 x0 = 1;
2121 if (y0 <= 0)
2122 y0 = 1;
2117 2123
2118 state = alloca (menu->panecount * sizeof (struct IT_menu_state)); 2124 state = alloca (menu->panecount * sizeof (struct IT_menu_state));
2119 screensize = screen_size * 2; 2125 screensize = screen_size * 2;