Skip to content

Commit

Permalink
- fixed bad serializers for vec2_t and vec3_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Sep 12, 2021
1 parent 6be611f commit e8187b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/core/gamefuncs.cpp
Expand Up @@ -302,7 +302,7 @@ void checkRotatedWalls()

FSerializer& Serialize(FSerializer& arc, const char* key, vec2_t& c, vec2_t* def)
{
if (def && !memcmp(&c, def, sizeof(c))) return arc;
if (arc.isWriting() && def && !memcmp(&c, def, sizeof(c))) return arc;
if (arc.BeginObject(key))
{
arc("x", c.x, def ? &def->x : nullptr)
Expand All @@ -314,7 +314,7 @@ FSerializer& Serialize(FSerializer& arc, const char* key, vec2_t& c, vec2_t* def

FSerializer& Serialize(FSerializer& arc, const char* key, vec3_t& c, vec3_t* def)
{
if (def && !memcmp(&c, def, sizeof(c))) return arc;
if (arc.isWriting() && def && !memcmp(&c, def, sizeof(c))) return arc;
if (arc.BeginObject(key))
{
arc("x", c.x, def ? &def->x : nullptr)
Expand Down

0 comments on commit e8187b4

Please sign in to comment.