Prevent memory corruption at DBC loading. Thanks to Lynx3d for investigating that issue
This commit is contained in:
parent
27586fde28
commit
0da30abdec
@ -410,14 +410,14 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
}
|
||||
|
||||
// prevent memory corruption; otherwise cls will become 12 below
|
||||
if ((talentTabInfo->ClassMask & CLASSMASK_ALL_PLAYABLE) == 0)
|
||||
if (! talentTabInfo->ClassMask & CLASSMASK_ALL_PLAYABLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// store class talent tab pages
|
||||
uint32 cls = 1;
|
||||
for (uint32 m = 1; !(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES; m <<= 1, ++cls)
|
||||
for (uint32 m = 1; !(m & talentTabInfo->ClassMask) && cls < 12 /*MAX_CLASSES*/; m << = 1, ++cls)
|
||||
{
|
||||
// TODO: WHAT, WHY... surely this is a mistake
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user