forked from 0ad/0ad
add safety check to get_slot (this appears to be part of the error andrew is getting - possibly the victim of mem corruption)
This was SVN commit r3151.
This commit is contained in:
parent
ae7303cce4
commit
76c7f96833
@ -166,6 +166,7 @@ public:
|
||||
T* get_slot(Key key)
|
||||
{
|
||||
u32 hash = Hash(key);
|
||||
debug_assert(max_entries != 0); // otherwise, mask will be incorrect
|
||||
const uint mask = max_entries-1;
|
||||
T* p;
|
||||
for(;;)
|
||||
|
Loading…
Reference in New Issue
Block a user