validate grade input (so we don't crash later writing stats.html)

This commit is contained in:
Glenn Maynard
2004-02-24 02:14:31 +00:00
parent 238b4683ac
commit 5faeed32e7
+3
View File
@@ -68,6 +68,9 @@ void HighScore::LoadFromNode( const XNode* pNode )
else if( (*child)->name == "SurviveSeconds" ) (*child)->GetValue( fSurviveSeconds );
else if( (*child)->name == "Modifiers" ) (*child)->GetValue( sModifiers );
}
/* Validate input. */
grade = clamp( grade, GRADE_TIER_1, GRADE_FAILED );
}