# HG changeset patch # User Eli Zaretskii # Date 853417249 0 # Node ID 45a12f628d3fbb18e73ac57d5cf950fe07381b54 # Parent 4a5fa29f79d6bbf9a725ba8debeb51edef46affc * (XMenuActivate): Don't allow non-positive menu coordinates. diff -r 4a5fa29f79d6 -r 45a12f628d3f src/msdos.c --- 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;