X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=80e81fff3403b469c8d4ac9617a1e9e3e8ef8138;hb=4b37cb99145f3d4911f7b726ec5189f9b1978c43;hp=35c458f2360d8b419c7c94c0a646c986235e3329;hpb=9250dcdc89caed1a52d632ffb558e7de60af8bfc;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 ); } }