mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-06 15:45:43 +00:00
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:
@@ -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(;;)
|
||||
|
||||
Reference in New Issue
Block a user