mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
- serialize null pointers correctly.
This commit is contained in:
parent
6f4a0c94e8
commit
b1f2475230
1 changed files with 3 additions and 3 deletions
|
@ -42,10 +42,10 @@ extern FixedBitArray<MAXSPRITES> activeSprites;
|
|||
|
||||
template<> FSerializer& Serialize(FSerializer& arc, const char* key, Duke3d::weaponhit*& ht, Duke3d::weaponhit** def)
|
||||
{
|
||||
size_t index = ht - Duke3d::hittype;
|
||||
assert(index < MAXSPRITES);
|
||||
ptrdiff_t index = ht? ht - Duke3d::hittype : -1;
|
||||
assert(index >= -1 && index < MAXSPRITES);
|
||||
Serialize(arc, key, index, nullptr);
|
||||
ht = &Duke3d::hittype[index];
|
||||
ht = index < 0? nullptr : &Duke3d::hittype[index];
|
||||
return arc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue