changeset 16871:45a12f628d3f

* (XMenuActivate): Don't allow non-positive menu coordinates.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 16 Jan 1997 12:20:49 +0000
parents 4a5fa29f79d6
children 1efa81ac7e5a
files src/msdos.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/msdos.c	Thu Jan 16 05:09:21 1997 +0000
+++ b/src/msdos.c	Thu Jan 16 12:20:49 1997 +0000
@@ -2114,6 +2114,12 @@
   /* Just in case we got here without a mouse present...  */
   if (have_mouse <= 0)
     return XM_IA_SELECT;
+  /* Don't allow non-positive x0 and y0, lest the menu will wrap
+     around the display.  */
+  if (x0 <= 0)
+    x0 = 1;
+  if (y0 <= 0)
+    y0 = 1;
 
   state = alloca (menu->panecount * sizeof (struct IT_menu_state));
   screensize = screen_size * 2;