From 964cad39cd7373a320516914cbcb0c4207ed4e64 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Fri, 4 Jan 2013 12:40:49 -0500 Subject: Added third star to Collect and added failsafe for GameModeInfo's init in case numOfStars is over 3 --- Classes/GameModeInfo.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Classes/GameModeInfo.m') diff --git a/Classes/GameModeInfo.m b/Classes/GameModeInfo.m index 08b95e5..91543fa 100644 --- a/Classes/GameModeInfo.m +++ b/Classes/GameModeInfo.m @@ -34,6 +34,11 @@ unlocked = m_unlocked; } + if (numOfStars > 3) + { + @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"There does not exist support for more than three stars in a game mode." userInfo:nil]; + } + stars = (BOOL*) calloc(numOfStars, sizeof(BOOL)); for (int i=0; i