From 4654e5049a782dae33e1e302ea1a55a9d8acfff9 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 6 Feb 2004 03:59:55 +0000 Subject: [PATCH] more helpful assert message --- stepmania/src/Sprite.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index 87bb74a1f7..07ae48a126 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -582,7 +582,10 @@ void Sprite::SetState( int iNewState ) // This assert will likely trigger if the "missing" theme element graphic // is loaded in place of a multi-frame sprite. We want to know about these // problems in debug builds, but they're not fatal. - DEBUG_ASSERT( iNewState >= 0 && iNewState < (int)m_States.size() ); +#ifdef DEBUG + RAGE_ASSERT_M( iNewState >= 0 && iNewState < (int)m_States.size(), + ssprintf("iNewState=%d, numStates=%u", iNewState, m_States.size()) ); +#endif CLAMP(iNewState, 0, (int)m_States.size()-1); m_iCurState = iNewState;