clang-tidy said this was a use-after-free

Also, what is this code doing?
This commit is contained in:
Michael Cook (mackal) 2017-03-16 14:10:36 -04:00
parent 153e587cea
commit 94d8db4691

View File

@ -2439,6 +2439,7 @@ void EntityList::UpdateWho(bool iSendFullUpdate)
memcpy(pack->pBuffer, tmp, pack->size);
pack->size = sizeof(ServerClientListKeepAlive_Struct) + (tmpNumUpdates * 4);
safe_delete_array(tmp);
sclka = (ServerClientListKeepAlive_Struct*) pack->pBuffer;
}
sclka->wid[sclka->numupdates] = it->second->GetWID();
sclka->numupdates++;