From 4ca7304e432285184e596df105cb6b6987cbee3a Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 12 Oct 2019 23:08:40 +0300 Subject: [PATCH] Fix uninitialized orderInCat --- src/peds/Ped.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 1ecb3037..cfc06f73 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -14586,7 +14586,7 @@ CPed::SetEnterCar(CVehicle *car, uint32 unused) void CPed::SetRadioStation(void) { - uint8 radiosPerRadioCategories[10][4] = { + static const uint8 radiosPerRadioCategories[10][4] = { {JAH_RADIO, RISE_FM, GAME_FM, MSX_FM}, {HEAD_RADIO, DOUBLE_CLEF, LIPS_106, FLASHBACK}, {RISE_FM, GAME_FM, MSX_FM, FLASHBACK}, @@ -14598,7 +14598,7 @@ CPed::SetRadioStation(void) {HEAD_RADIO, DOUBLE_CLEF, LIPS_106, FLASHBACK}, {CHATTERBOX, HEAD_RADIO, LIPS_106, GAME_FM} }; - uint8 orderInCat; + uint8 orderInCat = 0; // BUG: this wasn't initialized if (IsPlayer() || !m_pMyVehicle || m_pMyVehicle->pDriver != this) return;