mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- fixed: ACSStringPool::AddString did not check for NULL pointers as input. Let's just map them to the empty string, that's a lot better than crashing.
This commit is contained in:
parent
4cf0d76e8c
commit
3f57269a8b
1 changed files with 1 additions and 0 deletions
|
@ -375,6 +375,7 @@ void ACSStringPool::Clear()
|
|||
|
||||
int ACSStringPool::AddString(const char *str)
|
||||
{
|
||||
if (str == nullptr) str = "";
|
||||
size_t len = strlen(str);
|
||||
unsigned int h = SuperFastHash(str, len);
|
||||
unsigned int bucketnum = h % NUM_BUCKETS;
|
||||
|
|
Loading…
Reference in a new issue