mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- extended error messages in pointers serialization
This commit is contained in:
parent
dad0a6f977
commit
fc1f14b2eb
1 changed files with 3 additions and 3 deletions
|
@ -237,13 +237,13 @@ FSerializer &SerializePointer(FSerializer &arc, const char *key, T *&value, T **
|
|||
{
|
||||
vv = value - base;
|
||||
if (vv < 0 || vv >= count)
|
||||
I_Error("Trying to serialize out-of-bounds array value");
|
||||
I_Error("Trying to serialize out-of-bounds array value with key '%s', index = %lli, size = %lli", key, vv, count);
|
||||
}
|
||||
Serialize(arc, key, vv, nullptr);
|
||||
if (vv == -1)
|
||||
value = nullptr;
|
||||
else if (vv < 0 || vv >= count)
|
||||
I_Error("Trying to serialize out-of-bounds array value");
|
||||
I_Error("Trying to serialize out-of-bounds array value with key '%s', index = %lli, size = %lli", key, vv, count);
|
||||
else
|
||||
value = base + vv;
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ template<class T>
|
|||
FSerializer &SerializePointer(FSerializer &arc, const char *key, T *&value, T **defval, TArray<T> &array)
|
||||
{
|
||||
if (array.Size() == 0)
|
||||
I_Error("Trying to serialize a value from empty array");
|
||||
I_Error("Trying to serialize a value with key '%s' from empty array", key);
|
||||
return SerializePointer(arc, key, value, defval, array.Data(), array.Size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue