From f2b77cc3566a57e9c3dd6746161aedb572b62b58 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 23 Jun 2024 22:14:28 +0800 Subject: [PATCH] [server] Update `amx_StrParam` --- server/amx/amx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/amx/amx.h b/server/amx/amx.h index a4c3168..f173a64 100644 --- a/server/amx/amx.h +++ b/server/amx/amx.h @@ -357,8 +357,8 @@ enum { amx_GetAddr((amx), (param), &amx_cstr_); \ amx_StrLen(amx_cstr_, &amx_length_); \ if (amx_length_ > 0 && \ - ((result) = (void*)alloca((amx_length_ + 1) * sizeof(*(result)))) != NULL) \ - amx_GetString((char*)(result), amx_cstr_, sizeof(*(result))>1, amx_length_); \ + ((result) = (char*)alloca((amx_length_ + 1) * sizeof(*(result)))) != NULL) \ + amx_GetString((char*)(result), amx_cstr_, sizeof(*(result))>1, amx_length_ + 1); \ else (result) = NULL; \ } while (0)