From c7109785490cf46bd72418317ca7aab5c546bd13 Mon Sep 17 00:00:00 2001
From: Roman Chistokhodov <freeslave93@gmail.com>
Date: Thu, 11 Feb 2021 23:01:32 +0300
Subject: [PATCH] Fix a bug with extracting ammo from mp5 when argrenades are
 full

---
 dlls/weapons.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp
index 1795c191..a69ba196 100644
--- a/dlls/weapons.cpp
+++ b/dlls/weapons.cpp
@@ -1099,13 +1099,13 @@ int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon )
 	{
 		// blindly call with m_iDefaultAmmo. It's either going to be a value or zero. If it is zero,
 		// we only get the ammo in the weapon's clip, which is what we want. 
-		iReturn = pWeapon->AddPrimaryAmmo( m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1() );
+		iReturn |= pWeapon->AddPrimaryAmmo( m_iDefaultAmmo, (char *)pszAmmo1(), iMaxClip(), iMaxAmmo1() );
 		m_iDefaultAmmo = 0;
 	}
 
 	if( pszAmmo2() != NULL )
 	{
-		iReturn = pWeapon->AddSecondaryAmmo( 0, (char *)pszAmmo2(), iMaxAmmo2() );
+		iReturn |= pWeapon->AddSecondaryAmmo( 0, (char *)pszAmmo2(), iMaxAmmo2() );
 	}
 
 	return iReturn;