mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #310 from heinrich5991/pr_ddnet_map_settings_fix_settings_compare
Fix settings compare
This commit is contained in:
commit
ed5d8faa2a
|
@ -2594,7 +2594,7 @@ void CGameContext::OnMapChange(char *pNewMapName, int MapNameSize)
|
|||
SettingsIndex = pInfo->m_Settings;
|
||||
char *pMapSettings = (char *)Reader.GetData(SettingsIndex);
|
||||
int DataSize = Reader.GetUncompressedDataSize(SettingsIndex);
|
||||
if(DataSize == TotalLength && mem_comp(pSettings, pMapSettings, Size) == 0)
|
||||
if(DataSize == TotalLength && mem_comp(pSettings, pMapSettings, DataSize) == 0)
|
||||
{
|
||||
// Configs coincide, no need to update map.
|
||||
return;
|
||||
|
|
|
@ -70,7 +70,7 @@ void Process(IStorage *pStorage, const char *pMapName, const char *pConfigName)
|
|||
SettingsIndex = pInfo->m_Settings;
|
||||
char *pMapSettings = (char *)Reader.GetData(SettingsIndex);
|
||||
int DataSize = Reader.GetUncompressedDataSize(SettingsIndex);
|
||||
if(DataSize == TotalLength && mem_comp(pSettings, pMapSettings, Size) == 0)
|
||||
if(DataSize == TotalLength && mem_comp(pSettings, pMapSettings, DataSize) == 0)
|
||||
{
|
||||
dbg_msg("config_store", "configs coincide, not updating map");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue