Core/Maps: Fixed initializing instance free ids when compiled with WITH_COREDEBUG

Closes #19931
This commit is contained in:
Shauren
2017-06-21 17:55:38 +02:00
committed by Aokromes
parent 8d6f55b129
commit 3bf8426942

View File

@@ -311,7 +311,7 @@ void MapManager::InitInstanceIds()
_nextInstanceId = 1;
if (QueryResult result = CharacterDatabase.Query("SELECT IFNULL(MAX(id), 0) FROM instance"))
_freeInstanceIds.resize((*result)[0].GetUInt32() + 2, true); // make space for one extra to be able to access [_nextInstanceId] index in case all slots are taken
_freeInstanceIds.resize((*result)[0].GetUInt64() + 2, true); // make space for one extra to be able to access [_nextInstanceId] index in case all slots are taken
else
_freeInstanceIds.resize(_nextInstanceId + 1, true);