From b300c1dfe25ee05451b07d3852d83c9b5cf01891 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Wed, 31 Mar 2004 18:04:03 +0000 Subject: [PATCH] get_user_weapons sets the third parameter to 0 before counting --- amxmodx/amxmodx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index ba039dbe..d2f17541 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -440,6 +440,7 @@ static cell AMX_NATIVE_CALL get_user_weapons(AMX *amx, cell *params) /* 3 param if (pPlayer->ingame){ cell *cpNum = get_amxaddr(amx,params[3]); cell *cpIds = get_amxaddr(amx,params[2]); + *cpIds = 0; int weapons = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element for(int i = 1; i < MAX_WEAPONS; ++i){ if (weapons & (1<