Skip to content

Commit

Permalink
fix: initialize more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Dec 3, 2023
1 parent e0c266b commit cb4896c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/studiomodelpp/structs/VVD.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ struct BoneWeight {
struct Vertex {
BoneWeight boneWeight;

Vector3 position;
Vector3 normal;
Vector2 uv;
Vector3 position{};
Vector3 normal{};
Vector2 uv{};

Vector4 tangent; // Taken from tangents data section
Vector4 tangent{}; // Taken from tangents data section
};

struct VVD {
Expand Down
2 changes: 1 addition & 1 deletion src/structs/VVD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bool VVD::open(const std::byte* data, std::size_t size, int /*mdlVersion*/, int

stream.read(vertex.boneWeight.weight);

std::array<char, MAX_BONES_PER_VERTEX> bones;
std::array<char, MAX_BONES_PER_VERTEX> bones{};
stream.read(bones);
char boneCount = stream.read<char>();
for (int j = 0; j < boneCount && j < MAX_BONES_PER_VERTEX; j++) {
Expand Down

0 comments on commit cb4896c

Please sign in to comment.