From aae58edd62711f2a84470e40c7cc2e1bec8aa406 Mon Sep 17 00:00:00 2001 From: toxieainc Date: Mon, 3 Oct 2022 04:47:39 +0200 Subject: [PATCH] change one more place with potential aliasing issue --- Src/Graphics/Legacy3D/Legacy3D.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Graphics/Legacy3D/Legacy3D.cpp b/Src/Graphics/Legacy3D/Legacy3D.cpp index 1f99961..d8ba483 100644 --- a/Src/Graphics/Legacy3D/Legacy3D.cpp +++ b/Src/Graphics/Legacy3D/Legacy3D.cpp @@ -688,9 +688,9 @@ void CLegacy3D::DescendCullingNode(UINT32 addr) const UINT32 node1Ptr = node[0x07-offset]; const UINT32 node2Ptr = node[0x08-offset]; const UINT32 matrixOffset = node[0x03-offset]&0xFFF; - const float x = *(float *) &node[0x04-offset]; - const float y = *(float *) &node[0x05-offset]; - const float z = *(float *) &node[0x06-offset]; + const float x = Util::Uint32AsFloat(node[0x04-offset]); + const float y = Util::Uint32AsFloat(node[0x05-offset]); + const float z = Util::Uint32AsFloat(node[0x06-offset]); // Texture offset? TextureOffset oldTextureOffset = m_textureOffset; // save old offsets