diff --git a/stepmania/src/PercentageDisplay.cpp b/stepmania/src/PercentageDisplay.cpp index fdf4c9c6d1..d84fd48015 100644 --- a/stepmania/src/PercentageDisplay.cpp +++ b/stepmania/src/PercentageDisplay.cpp @@ -191,6 +191,8 @@ void PercentageDisplay::Refresh() RString PercentageDisplay::FormatPercentScore( float fPercentDancePoints ) { + CLAMP( fPercentDancePoints, 0.f, 1.f ); + // TRICKY: printf will round, but we want to truncate. Otherwise, we may display a percent // score that's too high and doesn't match up with the calculated grade. float fTruncInterval = powf( 0.1f, (float)PERCENT_TOTAL_SIZE-1 );