From c796cbf134ee1f3405a9def8e8a65bbd6d9cebb3 Mon Sep 17 00:00:00 2001 From: s1lent Date: Thu, 7 Dec 2017 16:46:37 +0700 Subject: [PATCH] Fix crash rg_get_iteminfo --- reapi/src/natives/natives_misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index c57960e..e2e7d5f 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -2035,7 +2035,7 @@ cell AMX_NATIVE_CALL rg_get_iteminfo(AMX *amx, cell *params) } cell *dest = getAmxAddr(amx, params[arg_output]); - size_t length = *getAmxAddr(amx, params[arg_length]); + size_t length = (PARAMS_COUNT == 4) ? *getAmxAddr(amx, params[arg_length]) : 0; switch (type) {