Browse Source

Fix a crash in robin_hood map, see martinus/robin-hood-hashing#23

Michael Ragazzon 6 years ago
parent
commit
cfd8f8fc39
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Include/Rocket/Core/Containers/robin_hood.h

+ 1 - 1
Include/Rocket/Core/Containers/robin_hood.h

@@ -1250,7 +1250,7 @@ public:
             // it will be the end() iterator.
             // it will be the end() iterator.
             mKeyVals = reinterpret_cast<Node*>(&mMask);
             mKeyVals = reinterpret_cast<Node*>(&mMask);
             // we need to point somewhere thats 0 as long as we're empty
             // we need to point somewhere thats 0 as long as we're empty
-            mInfo = reinterpret_cast<uint8_t*>(mMask);
+            mInfo = reinterpret_cast<uint8_t*>(&mMask);
             Hash::operator=(static_cast<const Hash&>(o));
             Hash::operator=(static_cast<const Hash&>(o));
             KeyEqual::operator=(static_cast<const KeyEqual&>(o));
             KeyEqual::operator=(static_cast<const KeyEqual&>(o));
             DataPool::operator=(static_cast<DataPool const&>(o));
             DataPool::operator=(static_cast<DataPool const&>(o));