mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Use the correct allocator when archiving a con_set object
The default c++ allocator was be used to allocate an array of pointers, but then when destroying the array, Z_Free was called which would throw an error
This commit is contained in:
parent
32ba71693c
commit
2c72908f76
1 changed files with 1 additions and 1 deletions
|
@ -293,7 +293,7 @@ void con_set<key, value>::Archive(Archiver& arc)
|
|||
|
||||
if (arc.Loading()) {
|
||||
if (tableLength != 1) {
|
||||
table = new Entry *[tableLength]();
|
||||
table = new (NewTable(tableLength)) Entry *[tableLength]();
|
||||
memset(table, 0, tableLength * sizeof(Entry *));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue