X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;fp=src%2Fgame.c;h=d7b6ad3d164a7799ecb87671b5272ceb0274797d;hp=4b7533ad779cabe27e85c770da5dae961eaf2378;hb=03a494c7a4afcd22849d3c0f42193ded57fdc700;hpb=892db4c42f305573f4ca35d93f34d295b7d239d6 diff --git a/src/game.c b/src/game.c index 4b7533ad..d7b6ad3d 100644 --- a/src/game.c +++ b/src/game.c @@ -5116,10 +5116,11 @@ static int addScoreEntry(struct ScoreInfo *list, struct ScoreEntry *new_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; + // add fields from server score entry not stored in local score entry + // (currently, this means setting platform, version and country fields; + // in rare cases, this may also correct an invalid score value, as + // historic scores might have been truncated to 16-bit values locally) + *entry = *new_entry; return -1; }