Skip to content

Commit

Permalink
prevent possible crash upon obtaining a new top ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jan 12, 2017
1 parent a2b4596 commit a02b719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ SongID Profile::GetTopSSRSongID(unsigned int rank, int skillset) {
return emptysongID;
}
HighScore* Profile::GetTopSSRHighScore(unsigned int rank, int skillset) {
if (rank == 0)
if (rank <= 0)
rank = 1;
if (rank > static_cast<unsigned int>(topSSRHighScores[skillset].size()))
if (CalcAllTopSSRs(rank) == false)
Expand Down

0 comments on commit a02b719

Please sign in to comment.