From 81858f9e6230d9e8b53aee5494454a503f92a10b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 14 Jun 2024 12:51:47 +0200 Subject: [PATCH] Update MDLMaterialLoader.cpp (#5620) * Update MDLMaterialLoader.cpp - closes https://github.com/assimp/assimp/issues/5239 * Add missing declaration --- code/AssetLib/MDL/MDLMaterialLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/MDL/MDLMaterialLoader.cpp b/code/AssetLib/MDL/MDLMaterialLoader.cpp index 38c42c1a5..a966f5920 100644 --- a/code/AssetLib/MDL/MDLMaterialLoader.cpp +++ b/code/AssetLib/MDL/MDLMaterialLoader.cpp @@ -730,7 +730,8 @@ void MDLImporter::SkipSkinLump_3DGS_MDL7( // if an ASCII effect description (HLSL?) is contained in the file, // we can simply ignore it ... if (iType & AI_MDL7_SKINTYPE_MATERIAL_ASCDEF) { - int32_t iMe = *((int32_t *)szCurrent); + int32_t iMe = 0; + ::memcpy(&iMe, szCurrent, sizeof(int32_t)); AI_SWAP4(iMe); szCurrent += sizeof(char) * iMe + sizeof(int32_t); }