From 0ff2366110f389a168e50418c628fa19a8510cb5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Jun 2004 03:52:10 +0000 Subject: [PATCH] asserts --- stepmania/src/ScreenSelectDifficulty.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index e1683a0ee6..1596a7a683 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -305,6 +305,7 @@ void ScreenSelectDifficulty::ChangePage( Page newPage ) } } } + ASSERT( iSwitchToIndex != -1 ); // change both players FOREACH_PlayerNumber( p ) @@ -320,6 +321,8 @@ void ScreenSelectDifficulty::ChangePage( Page newPage ) bool ScreenSelectDifficulty::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages ) { + ASSERT_M( iNewChoice >= 0 && iNewChoice < (int) m_ModeChoices[m_CurrentPage].size(), ssprintf("%i, %i", iNewChoice, (int) m_ModeChoices[m_CurrentPage].size()) ); + bool bAnyChanged = false; FOREACH_HumanPlayer( p ) {