[7555] Check pool_id bafire access to pool data in PoolHandler::CheckPool

This commit is contained in:
VladimirMangos 2009-03-28 00:03:40 +03:00
parent cc19245ce4
commit c5d9b6cf7b
2 changed files with 3 additions and 2 deletions

View file

@ -699,7 +699,8 @@ uint16 PoolHandler::IsPartOfAPool(uint32 guid, uint32 type)
// Method that check chance integrity of the creatures and gameobjects in this pool // Method that check chance integrity of the creatures and gameobjects in this pool
bool PoolHandler::CheckPool(uint16 pool_id) bool PoolHandler::CheckPool(uint16 pool_id)
{ {
return mPoolGameobjectGroups[pool_id].CheckPool() && return pool_id <= max_pool_id &&
mPoolGameobjectGroups[pool_id].CheckPool() &&
mPoolCreatureGroups[pool_id].CheckPool() && mPoolCreatureGroups[pool_id].CheckPool() &&
mPoolPoolGroups[pool_id].CheckPool(); mPoolPoolGroups[pool_id].CheckPool();
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7554" #define REVISION_NR "7555"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__