Skip to content

Commit

Permalink
Make sure animation properties initialized properly (#8938)
Browse files Browse the repository at this point in the history
* Make sure animation properties initialized properly
fix defold/extension-spine#171

* move constructor to gameproject.cpp
  • Loading branch information
AGulev committed May 17, 2024
1 parent 67a1a88 commit fd1ad4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engine/gameobject/src/dmsdk/gameobject/gameobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ namespace dmGameObject
};

uint8_t m_HasKey : 1;

PropertyOptions();
};

/*# property variant
Expand Down
4 changes: 4 additions & 0 deletions engine/gameobject/src/gameobject/gameobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ namespace dmGameObject
memset(this, 0, sizeof(InputAction));
}

PropertyOptions::PropertyOptions()
: m_Index(0)
, m_HasKey(0) {}

PropertyVar::PropertyVar()
{
DM_STATIC_ASSERT(sizeof(PropertyVar::m_URL) == sizeof(dmMessage::URL), Invalid_Struct_Alias_Size);
Expand Down

0 comments on commit fd1ad4c

Please sign in to comment.