diff options
| author | EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> | 2021-10-20 22:55:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 17:55:55 -0400 |
| commit | 4f7b8393ec8a3abd59649c2ba669e951fb61f3d2 (patch) | |
| tree | e1472181845acc8ca5f41bdef761b31648f8a7cb /ZAPD/ZSkeleton.cpp | |
| parent | 6f744be6bcec9ebf4bc852d00f3535e6f2352939 (diff) | |
Plug some large leaks, deprecate `Segment="128"` (#204)
* Fix freeing an uninitialised camData
* exporter leaks
* vtx leak fix
* Fix ZSkeleton OOB reading
* Improve segment assignment checking and add a default
Also prevents non-segmented files not being freed
* Plug leak in MakeDlist
* More segment improvements: deprecate 128
* add externalfile to extraction reference
* whoops
* format
* Document new Segment behaviour
* Use deprecation ifdef
Co-authored-by: angie <angheloalf95@gmail.com>
Diffstat (limited to 'ZAPD/ZSkeleton.cpp')
| -rw-r--r-- | ZAPD/ZSkeleton.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ZAPD/ZSkeleton.cpp b/ZAPD/ZSkeleton.cpp index ebdf645..84f00c8 100644 --- a/ZAPD/ZSkeleton.cpp +++ b/ZAPD/ZSkeleton.cpp @@ -49,7 +49,11 @@ void ZSkeleton::ParseRawData() const auto& rawData = parent->GetRawData(); limbsArrayAddress = BitConverter::ToUInt32BE(rawData, rawDataIndex); limbCount = BitConverter::ToUInt8BE(rawData, rawDataIndex + 4); - dListCount = BitConverter::ToUInt8BE(rawData, rawDataIndex + 8); + + if (type == ZSkeletonType::Flex) + { + dListCount = BitConverter::ToUInt8BE(rawData, rawDataIndex + 8); + } if (limbsArrayAddress != 0 && GETSEGNUM(limbsArrayAddress) == parent->segment) { |
