Mercurial > emacs
diff src/msdos.c @ 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 | 7370bcad5cb1 |
children | 1efa81ac7e5a |
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;