From 551e5298cce8f38df5a1cf349429fb9330431324 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Sun, 5 Nov 2006 18:38:09 +0000 Subject: [PATCH] fixed bug am46924 --- amxmodx/amxmodx.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 1f050c3c..b9d01907 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -4263,7 +4263,19 @@ static cell AMX_NATIVE_CALL is_user_hacking(AMX *amx, cell *params) static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params) { - memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell)); + cell value = params[2]; + + if (!value) + { + memset(get_amxaddr(amx, params[1]), 0, params[3] * sizeof(cell)); + } else { + int size = params[3]; + cell *addr = get_amxaddr(amx, params[1]); + for (int i=0; i