From ad634924faa35fe551971b3d4f3ce97903604866 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 5 Sep 2005 21:43:05 +0000 Subject: [PATCH] Fixed two bugs from at18519 (Lord of Destruction) --- amxmodx/natives.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/amxmodx/natives.cpp b/amxmodx/natives.cpp index 55a5d439..52c96103 100755 --- a/amxmodx/natives.cpp +++ b/amxmodx/natives.cpp @@ -266,8 +266,7 @@ static cell AMX_NATIVE_CALL get_array(AMX *amx, cell *params) int size = params[3]; - while (size-->0) - *dest = *source; + memcpy(dest, source, size * sizeof(cell)); return 1; } @@ -293,8 +292,7 @@ static cell AMX_NATIVE_CALL set_array(AMX *amx, cell *params) int size = params[3]; - while (size-->0) - *dest = *source; + memcpy(dest, source, size * sizeof(cell)); return 1; } @@ -424,7 +422,7 @@ AMX_NATIVE_INFO g_NativeNatives[] = { {"get_param", get_param}, {"get_param_byref", get_param_byref}, {"set_param_byref", set_param_byref}, - {"get_array", set_array}, + {"get_array", get_array}, {"set_array", set_array}, //these are dummy functions for floats ;p {"get_param_f", get_param},