mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- don't skip empty arrays which are themselves array elements in the ZScript serializer.
This commit is contained in:
parent
aaaf9aa108
commit
af14609de7
1 changed files with 4 additions and 1 deletions
|
@ -1968,7 +1968,10 @@ void PDynArray::SetPointerArray(void *base, unsigned offset, TArray<size_t> *spe
|
|||
void PDynArray::WriteValue(FSerializer &ar, const char *key, const void *addr) const
|
||||
{
|
||||
FArray *aray = (FArray*)addr;
|
||||
if (aray->Count > 0)
|
||||
// We may skip an empty array only if it gets stored under a named key.
|
||||
// If no name is given, i.e. it's part of an outer array's element list, even empty arrays must be stored,
|
||||
// because otherwise the array would lose its entry.
|
||||
if (aray->Count > 0 || key == nullptr)
|
||||
{
|
||||
if (ar.BeginArray(key))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue