diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index 7bb96b846a..3e58bac8dd 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -390,7 +390,7 @@ XNode* ScoresAtRate::CreateNode(const int& rate) const { string rs = ssprintf("%.3f", static_cast(rate) / 10000.f); // should be safe as this is only called if there is at least 1 score (which would be the pb) o->AppendAttr("PBKey", PBptr->GetScoreKey()); - if(noccPBptr != nullptr) + if(noccPBptr != nullptr && PBptr->GetScoreKey() != noccPBptr->GetScoreKey()) // don't write unless it's different from the pbkey -mina o->AppendAttr("noccPBKey", noccPBptr->GetScoreKey()); o->AppendAttr("BestGrade", GradeToString(bestGrade)); o->AppendAttr("Rate", rs);