From a81820d0d7985686f779c06c0e5bfb6fd28b6e69 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sat, 9 Nov 2024 16:46:39 +0200 Subject: [PATCH] Fix UB compilation --- Tactical/Overhead.cpp | 6 +++--- Tactical/Overhead.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 88f58a42..1b155c8d 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -10876,11 +10876,11 @@ BOOLEAN CanMsgBoxForPlayerToBeNotifiedOfSomeoneElseInSector() } -INT8 NumMercsOnPlayerTeam( ) +UINT16 NumMercsOnPlayerTeam( ) { - INT32 cnt; + INT32 cnt; SOLDIERTYPE *pSoldier; - UINT8 ubCount = 0; + UINT16 ubCount = 0; cnt = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; diff --git a/Tactical/Overhead.h b/Tactical/Overhead.h index 4d2ba7d9..33c6cfae 100644 --- a/Tactical/Overhead.h +++ b/Tactical/Overhead.h @@ -333,10 +333,10 @@ void SetMsgBoxForPlayerBeNotifiedOfSomeoneElseInSector(); void HandleDisplayingOfPlayerLostDialogue( ); // UTILITY FUNCTIONS -INT8 NumActiveAndConsciousTeamMembers( UINT8 ubTeam ); -UINT8 NumEnemyInSector( ); -UINT8 NumCapableEnemyInSector( ); -INT8 NumMercsOnPlayerTeam( ); +UINT16 NumActiveAndConsciousTeamMembers( UINT8 ubTeam ); +UINT16 NumEnemyInSector( ); +UINT16 NumCapableEnemyInSector( ); +UINT16 NumMercsOnPlayerTeam( ); #endif extern BOOLEAN sniperwarning;