fixed setting score info to defaults
[rocksndiamonds.git] / src / files.c
index 8656cecc76e46dc61ba0ccabf50364bc65c6a13d..8a8f71f5ff0cd0035a53dd89ca8f2c94cc8a512b 100644 (file)
@@ -8650,6 +8650,13 @@ static void setScoreInfoToDefaultsExt(struct ScoreInfo *scores)
     strcpy(scores->entry[i].name, EMPTY_PLAYER_NAME);
     scores->entry[i].score = 0;
     scores->entry[i].time = 0;
+
+    scores->entry[i].id = -1;
+    strcpy(scores->entry[i].tape_date,    UNKNOWN_NAME);
+    strcpy(scores->entry[i].platform,     UNKNOWN_NAME);
+    strcpy(scores->entry[i].version,      UNKNOWN_NAME);
+    strcpy(scores->entry[i].country_name, UNKNOWN_NAME);
+    strcpy(scores->entry[i].country_code, "??");
   }
 
   scores->num_entries = 0;
@@ -9443,6 +9450,12 @@ static void LoadServerScoreFromCache(int nr)
     { &score_entry.time,               FALSE,  0                       },
     { score_entry.name,                        TRUE,   MAX_PLAYER_NAME_LEN     },
     { score_entry.tape_basename,       TRUE,   MAX_FILENAME_LEN        },
+    { score_entry.tape_date,           TRUE,   MAX_ISO_DATE_LEN        },
+    { &score_entry.id,                 FALSE,  0                       },
+    { score_entry.platform,            TRUE,   MAX_PLATFORM_TEXT_LEN   },
+    { score_entry.version,             TRUE,   MAX_VERSION_TEXT_LEN    },
+    { score_entry.country_code,                TRUE,   MAX_COUNTRY_CODE_LEN    },
+    { score_entry.country_name,                TRUE,   MAX_COUNTRY_NAME_LEN    },
 
     { NULL,                            FALSE,  0                       }
   };