From e686f5bc390ee0b37527cb3a504657b11b8f8873 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 7 Aug 2022 15:01:28 +0200 Subject: [PATCH] yet another fix to racing --- system.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system.cpp b/system.cpp index 0e0cadaa..c64269c2 100644 --- a/system.cpp +++ b/system.cpp @@ -1265,7 +1265,10 @@ EX void loadsave() { int land, score; sscanf(buf, "%70s%9s%d%d", buf1, ver, &land, &score); /* score may equal 0 because of earlier bugs */ - if(score) racing::best_scores[eLand(land)] = score; + if(score) { + auto& res = racing::best_scores[eLand(land)]; + if(score < res || res == 0) res = score; + } println(hlog, "loaded the score for ", dnameof(eLand(land)), " of ", score); } #endif