From 40c993b878e667d83c595d68d4f8d2e1f3839ef1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 6 Feb 2022 15:42:45 +0100 Subject: [PATCH] added using server score if higher than (potentially truncated) local score --- src/game.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game.c b/src/game.c index 43a0b8c2..defb1d08 100644 --- a/src/game.c +++ b/src/game.c @@ -5094,7 +5094,14 @@ static int addScoreEntry(struct ScoreInfo *list, struct ScoreEntry *new_entry, // (special case: historic score entries have an empty tape basename entry) if (strEqual(new_entry->tape_basename, entry->tape_basename) && !strEqual(new_entry->tape_basename, UNDEFINED_FILENAME)) + { + // special case: use server score instead of local score value if higher + // (historic scores might have been truncated to 16-bit values locally) + if (score_is_better) + entry->score = new_entry->score; + return -1; + } if (is_better || entry_is_empty) { -- 2.34.1