From fd20baaf09b141cb94710d504403ebdc69c500f4 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 23 Nov 2023 03:48:06 -0800 Subject: [PATCH] Fix UB in remote input info (#1316) Yes i should have made this first no this wouldnt have happened with rust --- dGame/dComponents/VehiclePhysicsComponent.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dGame/dComponents/VehiclePhysicsComponent.h b/dGame/dComponents/VehiclePhysicsComponent.h index 69f8579c6..94ba650ad 100644 --- a/dGame/dComponents/VehiclePhysicsComponent.h +++ b/dGame/dComponents/VehiclePhysicsComponent.h @@ -6,6 +6,13 @@ #include "eReplicaComponentType.h" struct RemoteInputInfo { + RemoteInputInfo() { + m_RemoteInputX = 0; + m_RemoteInputY = 0; + m_IsPowersliding = false; + m_IsModified = false; + } + void operator=(const RemoteInputInfo& other) { m_RemoteInputX = other.m_RemoteInputX; m_RemoteInputY = other.m_RemoteInputY;