- fixed: Arrays serialized as array elements may not skip their serialization if their content are all zero.

This commit is contained in:
Christoph Oelckers 2022-10-16 23:46:20 +02:00
parent 3e3e3714dc
commit 31eb2e5f10

View file

@ -159,7 +159,7 @@ public:
template<class T> template<class T>
FSerializer &Array(const char *key, T *obj, T *def, int count, bool fullcompare = false) FSerializer &Array(const char *key, T *obj, T *def, int count, bool fullcompare = false)
{ {
if (!save_full && fullcompare && isWriting() && def != nullptr && !memcmp(obj, def, count * sizeof(T))) if (!save_full && fullcompare && isWriting() && key != nullptr && def != nullptr && !memcmp(obj, def, count * sizeof(T)))
{ {
return *this; return *this;
} }