From: Holger Schemel Date: Sun, 3 Sep 2023 20:57:17 +0000 (+0200) Subject: fixed bug with re-initialized variables when reading multiple config files X-Git-Tag: 4.3.7.0~34 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f110301d5f36f0a9bf0a7f45208c4cd6c85acb01;p=rocksndiamonds.git fixed bug with re-initialized variables when reading multiple config files --- diff --git a/src/files.c b/src/files.c index 69ef8a52..58d3e1b7 100644 --- a/src/files.c +++ b/src/files.c @@ -12725,13 +12725,12 @@ static void LoadMenuDesignSettingsFromFilename(char *filename) } } - // special case: check if network and preview player positions are redefined - InitMenuDesignSettings_PreviewPlayers(); - InitMenuDesignSettings_PreviewPlayers_FromHash(setup_file_hash); - // read (and overwrite with) values that may be specified in config file InitMenuDesignSettings_FromHash(setup_file_hash, TRUE); + // special case: check if network and preview player positions are redefined + InitMenuDesignSettings_PreviewPlayers_FromHash(setup_file_hash); + freeSetupFileHash(setup_file_hash); } @@ -12741,6 +12740,7 @@ void LoadMenuDesignSettings(void) InitMenuDesignSettings_Static(); InitMenuDesignSettings_SpecialPreProcessing(); + InitMenuDesignSettings_PreviewPlayers(); if (!GFX_OVERRIDE_ARTWORK(ARTWORK_TYPE_GRAPHICS)) {