Merge pull request #310 from heinrich5991/pr_ddnet_map_settings_fix_settings_compare

Fix settings compare
This commit is contained in:
Dennis Felsing 2015-08-27 16:24:39 +02:00
commit ed5d8faa2a
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;