From 684f159ed3e1939f0ee6611b69b02b12a744cf71 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 29 Jun 2003 19:28:55 +0000 Subject: [PATCH] avoid potential div/0 --- stepmania/src/StageStats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index 98c5754203..709d6471a8 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -55,7 +55,7 @@ Grade StageStats::GetGrade( PlayerNumber pn ) { ASSERT( GAMESTATE->IsPlayerEnabled(pn) ); // should be calling this is player isn't joined! - if( bFailed[pn] ) + if( bFailed[pn] || !iPossibleDancePoints[pn] ) return GRADE_E; /* Based on the percentage of your total "Dance Points" to the maximum