mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-21 15:43:45 +00:00
Merge pull request #668 from BeamNG/fix_stringtable_zero_division
Fix for avoid a zero division on _StringTable::resize.
This commit is contained in:
commit
46b213f828
1 changed files with 4 additions and 1 deletions
|
|
@ -195,8 +195,11 @@ StringTableEntry _StringTable::lookupn(const char* val, S32 len, const bool cas
|
|||
}
|
||||
|
||||
//--------------------------------------
|
||||
void _StringTable::resize(const U32 newSize)
|
||||
void _StringTable::resize(const U32 _newSize)
|
||||
{
|
||||
/// avoid a possible 0 division
|
||||
const U32 newSize = _newSize ? _newSize : 1;
|
||||
|
||||
Node *head = NULL, *walk, *temp;
|
||||
U32 i;
|
||||
// reverse individual bucket lists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue