From 2b3aab071760c15abfbd99c070cf368d715e5173 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 May 2006 14:51:57 +0000 Subject: check event button against GLUT_MAX_MENUS (bug 1484284) --- src/glut/glx/glut_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/glut') diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c index e453fe0..f997f77 100644 --- a/src/glut/glx/glut_event.c +++ b/src/glut/glx/glut_event.c @@ -438,7 +438,8 @@ processEventsAndTimeouts(void) __glutFinishMenu(event.xbutton.window, event.xbutton.x, event.xbutton.y); } else { window = __glutGetWindow(event.xbutton.window); - if (window) { + /* added button check for mice with > 3 buttons */ + if (window && event.xbutton.button <= GLUT_MAX_MENUS) { GLUTmenu *menu; int menuNum; -- cgit v1.1