X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=c7d53181cd608a8e6edc80be774a95170b25af58;hb=4a6c501688b7fbd4f46e61aab76611499819e347;hp=882b7ccb256d583ec317195149413c404c540544;hpb=eb5b2a18c2e9de277fd913619afaf971e4401463;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 882b7cc..c7d5318 100644 --- a/scene.c +++ b/scene.c @@ -286,7 +286,11 @@ void makeMenu() { for ( int i = 0; i < menuNumber; i++ ) { char name[10]; // buffer to hold name int startNum = i*11 - (i-1); - sprintf(name, "%d-%d", startNum, startNum + 9); + int endNum = startNum + 9; + if ( i == menuNumber - 1 ) { // We're on the last one + endNum = startNum + 4; + } + sprintf(name, "%d-%d", startNum, endNum); glutAddSubMenu( name, addObjectSubmenu[i] ); }