diff options
author | Eli Zaretskii <eliz@gnu.org> | 1997-01-16 12:20:49 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 1997-01-16 12:20:49 +0000 |
commit | bf8360aed29c9011653cfb65c61addcc3fa092ac (patch) | |
tree | 46c1e2d919d9ae0651122f1b042332d5ba70a638 /src/msdos.c | |
parent | 090be653c38dbe456e536426f33568f8e4971ad9 (diff) | |
download | emacs-bf8360aed29c9011653cfb65c61addcc3fa092ac.tar.gz |
* (XMenuActivate): Don't allow non-positive menu
coordinates.
Diffstat (limited to 'src/msdos.c')
-rw-r--r-- | src/msdos.c | 6 |
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, /* 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; |