From 98cab67624c2ccb46b310cd8d87afdabf2aefafb Mon Sep 17 00:00:00 2001 From: silversurfer Date: Wed, 2 Jan 2019 13:22:24 +0000 Subject: [PATCH] Fix: Errors in UB code git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8647 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 4 ++-- Tactical/Ja25_Tactical.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 4a7246af..62a1e904 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -55,8 +55,8 @@ #endif -CHAR8 czVersionNumber[16] = { "Build 18.12.02" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 19.01.02" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; -CHAR16 zRevisionNumber[16] = { L"Revision 8643" }; +CHAR16 zRevisionNumber[16] = { L"Revision 8647" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Tactical/Ja25_Tactical.cpp b/Tactical/Ja25_Tactical.cpp index c4b1ede2..9b08f7da 100644 --- a/Tactical/Ja25_Tactical.cpp +++ b/Tactical/Ja25_Tactical.cpp @@ -488,14 +488,14 @@ UINT8 GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( UINT8 *pSoldierIdArr if( pProfileIdArray != NULL ) { //record the profile num of the merc - pProfileIdArray[ bNumMercsPresent ] = pSoldier->ubProfile; + pProfileIdArray[ usNumMercsPresent ] = pSoldier->ubProfile; } //if we are to return an array of the mercs if( pSoldierIdArray != NULL ) { //record the soldier num of the merc - pSoldierIdArray[ bNumMercsPresent ] = pSoldier->ubID; + pSoldierIdArray[ usNumMercsPresent ] = pSoldier->ubID; } ++usNumMercsPresent; @@ -562,7 +562,7 @@ UINT8 RandomArrayOfQualifiedMercs( UINT8 *pRandomSoldierIdArray ) //Get the number and array of the new soldiers usNumMercsPresent = GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( SoldierIdArray, NULL ); - Assert( bNumMercsPresent < NUM_MERCS_WITH_NEW_QUOTES ); + Assert( usNumMercsPresent < NUM_MERCS_WITH_NEW_QUOTES ); if( usNumMercsPresent > 0 ) {