From 42d7714d48624367ebe674facd5fca3bea50ce17 Mon Sep 17 00:00:00 2001 From: gir489 <100792176+gir489returns@users.noreply.github.com> Date: Sun, 23 Jul 2023 13:54:01 -0400 Subject: [PATCH] Fixed Debug Locals using improper casting for the float scenario. (#1823) --- src/views/debug/view_debug_locals.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/debug/view_debug_locals.cpp b/src/views/debug/view_debug_locals.cpp index 8a3aac61..85c5ce02 100644 --- a/src/views/debug/view_debug_locals.cpp +++ b/src/views/debug/view_debug_locals.cpp @@ -165,7 +165,7 @@ namespace big if (local_.m_freeze) { - *local_.m_internal_address = local_.m_freeze_value_float; + *(float*)local_.m_internal_address = local_.m_freeze_value_float; } break; case 2: @@ -201,7 +201,7 @@ namespace big if (ImGui::Checkbox("Freeze", &local_.m_freeze)) { local_.m_freeze_value_int = *local_.m_internal_address; - local_.m_freeze_value_float = (float)*local_.m_internal_address; + local_.m_freeze_value_float = *reinterpret_cast(local_.m_internal_address); local_.m_freeze_value_vector3 = *local_.m_internal_address_vector3; } }