From e762d9f01a0a204b098aa5b580ccfc1d2f851cb1 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sat, 8 Oct 2011 13:52:59 +0800 Subject: [PATCH] --- scene.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene.c b/scene.c index accd01f..4ab2ecf 100644 --- a/scene.c +++ b/scene.c @@ -274,7 +274,8 @@ void makeMenu() { for( int i = 0; i < menuNumber; i++ ) { addObjectSubmenu[i] = glutCreateMenu(processObjectEvents); - for ( int j = i; j < (i+9); j++ ) { + int startNum = i*11 - (i-1); + for ( int j = startNum; j < (startNum+9); j++ ) { if ( !objectMenuEntries[j] ) break; // Detect if we've reached the end of the array glutAddMenuEntry( objectMenuEntries[j], j ); } -- 2.20.1