From 49a2a47dc83d076ad775dba880c99daeb187c7aa Mon Sep 17 00:00:00 2001 From: Learath Date: Wed, 2 Oct 2019 20:44:03 +0300 Subject: [PATCH] Fix #1888 --- src/engine/client/client.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index bec6d186e..d1ada7674 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1187,9 +1187,17 @@ int CClient::PlayerScoreNameComp(const void *a, const void *b) return -1; if(!p0->m_Player && p1->m_Player) return 1; - if(p0->m_Score > p1->m_Score) + + int Score0 = p0->m_Score; + int Score1 = p1->m_Score; + if(Score0 == -9999) + Score0 = INT_MIN; + if(Score1 == -9999) + Score1 = INT_MIN; + + if(Score0 > Score1) return -1; - if(p0->m_Score < p1->m_Score) + if(Score0 < Score1) return 1; return str_comp_nocase(p0->m_aName, p1->m_aName); }