From: Ash Tyndall Date: Sat, 8 Oct 2011 06:02:15 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=84de854b0db5bb503f3cdaf5864935dd7af4b303;hp=c4add7b481d8467cf359e4ae7be9c39f86f5517d;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index fdb4f07..e6dee1f 100644 --- a/scene.c +++ b/scene.c @@ -276,7 +276,7 @@ void makeMenu() { addObjectSubmenu[i] = glutCreateMenu(processObjectEvents); int startNum = i*11 - (i-1); for ( int j = startNum - 1; j < (startNum+9); j++ ) { - if ( j == objectMenuEntriesSize ) break; // Detect if we've reached the end of the array + if ( j + 1 == objectMenuEntriesSize ) break; // Detect if we've reached the end of the array glutAddMenuEntry( objectMenuEntries[j], j ); } }