mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
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
This commit is contained in:
+2
-2
@@ -55,8 +55,8 @@
|
|||||||
|
|
||||||
#endif
|
#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 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
|
// SAVE_GAME_VERSION is defined in header, change it there
|
||||||
|
|||||||
@@ -488,14 +488,14 @@ UINT8 GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( UINT8 *pSoldierIdArr
|
|||||||
if( pProfileIdArray != NULL )
|
if( pProfileIdArray != NULL )
|
||||||
{
|
{
|
||||||
//record the profile num of the merc
|
//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 we are to return an array of the mercs
|
||||||
if( pSoldierIdArray != NULL )
|
if( pSoldierIdArray != NULL )
|
||||||
{
|
{
|
||||||
//record the soldier num of the merc
|
//record the soldier num of the merc
|
||||||
pSoldierIdArray[ bNumMercsPresent ] = pSoldier->ubID;
|
pSoldierIdArray[ usNumMercsPresent ] = pSoldier->ubID;
|
||||||
}
|
}
|
||||||
|
|
||||||
++usNumMercsPresent;
|
++usNumMercsPresent;
|
||||||
@@ -562,7 +562,7 @@ UINT8 RandomArrayOfQualifiedMercs( UINT8 *pRandomSoldierIdArray )
|
|||||||
//Get the number and array of the new soldiers
|
//Get the number and array of the new soldiers
|
||||||
usNumMercsPresent = GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( SoldierIdArray, NULL );
|
usNumMercsPresent = GetNumSoldierIdAndProfileIdOfTheNewMercsOnPlayerTeam( SoldierIdArray, NULL );
|
||||||
|
|
||||||
Assert( bNumMercsPresent < NUM_MERCS_WITH_NEW_QUOTES );
|
Assert( usNumMercsPresent < NUM_MERCS_WITH_NEW_QUOTES );
|
||||||
|
|
||||||
if( usNumMercsPresent > 0 )
|
if( usNumMercsPresent > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user