Fix: Adding mercs to a vehicle when the player already has the maximum number of vehicles caused the game to crash on the next move order.

Trying to add more mercs to a vehicle than there was seats caused an error message with a 'null' name for the vehicle.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2014-10-12 13:06:31 +00:00
parent 5f80ad78d7
commit 75b628df57
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -8392,7 +8392,7 @@ void VehicleMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
}
else
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, gzLateLocalizedString[ 18 ], zVehicleName[ pVehicleList[ iVehicleID ].ubVehicleType ] );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, gzLateLocalizedString[ 18 ], gNewVehicle[ pVehicleList[ iVehicleID ].ubVehicleType ].NewVehicleStrings );
}
fShowAssignmentMenu = FALSE;
+2 -1
View File
@@ -1718,7 +1718,8 @@ BOOLEAN EnterVehicle( SOLDIERTYPE *pVehicle, SOLDIERTYPE *pSoldier, UINT8 ubSeat
}
// OK, add....
AddSoldierToVehicle( pSoldier, pVehicle->bVehicleID, ubSeatIndex );
if ( !AddSoldierToVehicle( pSoldier, pVehicle->bVehicleID, ubSeatIndex) )
return( FALSE);
if ( !(guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
{