Skip to content

Commit 9decb08

Browse files
authored
[CORE] Fix memset zero in max2w3d's VectorChannelClass::SaveAdaptiveDelta() (#1195)
1 parent 03a4184 commit 9decb08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Core/Tools/WW3D/max2w3d/vchannel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,12 @@ bool VectorChannelClass::SaveAdaptiveDelta(ChunkSaveClass & csave, BitChannelCla
446446
// Brute Force Compressor
447447

448448
// Initialize Chan Data
449+
memset(chn, 0, channelsize);
449450
chn->NumFrames = MaxFrames;
450451
chn->Pivot = ID;
451452
chn->VectorLen = VectorLen;
452453
chn->Flags = Flags;
453454
chn->Scale = 0.0f;
454-
memset(&chn->Data[0], channelsize - (sizeof(W3dAdaptiveDeltaAnimChannelStruct) - sizeof(char)), 0x00);
455455

456456
assert(VectorLen <= 4); // otherwise temp vector won't have room
457457

0 commit comments

Comments
 (0)