Fix: crash when transforming attached items on guns with magsize modifiers

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6244 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-07-25 21:43:04 +00:00
parent 1860fee5b8
commit bc49864000
+4
View File
@@ -5781,6 +5781,10 @@ void RenderBulletIcon(OBJECTTYPE *pObject, UINT32 ubStatusIndex)
if(!gfInItemDescBox)
return;
// Flugente: if the ammo button does not exist, no point in entering its text...
if ( giItemDescAmmoButton < 0 )
return;
if ( GetMagSize(pObject) <= 99 )
swprintf( pStr, L"%d/%d", (*pObject)[ubStatusIndex]->data.gun.ubGunShotsLeft, GetMagSize(pObject));
else