From cb4896c5c12b33950369267c78a8c3d83962afcd Mon Sep 17 00:00:00 2001 From: craftablescience Date: Sun, 3 Dec 2023 05:05:53 -0500 Subject: [PATCH] fix: initialize more stuff --- include/studiomodelpp/structs/VVD.h | 8 ++++---- src/structs/VVD.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/studiomodelpp/structs/VVD.h b/include/studiomodelpp/structs/VVD.h index 5c587e077..92d657c87 100644 --- a/include/studiomodelpp/structs/VVD.h +++ b/include/studiomodelpp/structs/VVD.h @@ -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 { diff --git a/src/structs/VVD.cpp b/src/structs/VVD.cpp index 9675f25fb..80b13c250 100644 --- a/src/structs/VVD.cpp +++ b/src/structs/VVD.cpp @@ -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 bones; + std::array bones{}; stream.read(bones); char boneCount = stream.read(); for (int j = 0; j < boneCount && j < MAX_BONES_PER_VERTEX; j++) {