mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: deadlock on ammo creation popup
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8385 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1886,7 +1886,10 @@ void popupCallbackAmmo(UINT16 item, UINT16 pocket, SOLDIERTYPE* pSoldier ){
|
||||
{
|
||||
clipCreated = false;
|
||||
bLoop = tempStack.ubNumberOfObjects;
|
||||
while(tempStack.ubNumberOfObjects > 0)
|
||||
|
||||
// Flugente: This is just asking for trouble if AddObjectsToStack(...) fails. As we don't know from its return value whether it worked (wtf?), we exit in a different way
|
||||
int loopcnt = bLoop;
|
||||
while ( tempStack.ubNumberOfObjects > 0 && loopcnt > 0 )
|
||||
{
|
||||
if(pocket != -1)
|
||||
{
|
||||
@@ -1898,7 +1901,10 @@ void popupCallbackAmmo(UINT16 item, UINT16 pocket, SOLDIERTYPE* pSoldier ){
|
||||
}
|
||||
if(bLoop < 1)
|
||||
break;
|
||||
|
||||
--loopcnt;
|
||||
}
|
||||
|
||||
if(tempStack.ubNumberOfObjects < 1)
|
||||
clipCreated = true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user