Merged from revision: 7140

Bugfix (by anv)
- possible crash when viewing general stats of machineguns with no single shot available (due to comparison feature)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7141 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-04-06 18:31:56 +00:00
parent acd6cde6ae
commit e0448af30d
+2 -3
View File
@@ -8310,11 +8310,10 @@ void DrawWeaponValues( OBJECTTYPE * gpItemDescObject )
// Reset font color
SetFontForeground( 6 );
}
else
else if( fComparisonMode )
{
if( !Weapon[gpComparedItemDescObject->usItem].NoSemiAuto )
{
INT16 iComparedSingleAPCost = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], gpComparedItemDescObject, NULL );
{ INT16 iComparedSingleAPCost = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], gpComparedItemDescObject, NULL );
SetFontForeground( ITEMDESC_FONTPOSITIVE );
swprintf( pStr, L"%d", iComparedSingleAPCost );
}