From: Ash Tyndall Date: Sat, 8 Oct 2011 05:58:42 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4b37cb99145f3d4911f7b726ec5189f9b1978c43;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 35c458f..80e81ff 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 ( !objectMenuEntries[j] ) break; // Detect if we've reached the end of the array + if ( j == objectMenuEntriesSize - 1 ) break; // Detect if we've reached the end of the array glutAddMenuEntry( objectMenuEntries[j], j ); } }