From dfea6f61d2f3a771c7f0d72256f26e3eb941526c Mon Sep 17 00:00:00 2001 From: KaidoRen Date: Wed, 15 May 2019 08:46:56 +0500 Subject: [PATCH] Binary compatibility for previously compiled plugins --- amxmodx/amxmodx.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 7e03d67c..5b65f04d 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -1406,8 +1406,6 @@ static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 5 param * const char *title = get_amxstring(amx, params[arg_title], arg_title - 1, i); const char *vers = get_amxstring(amx, params[arg_version], arg_version - 1, i); const char *author = get_amxstring(amx, params[arg_author], arg_author - 1, i); - const char *url = get_amxstring(amx, params[arg_url], arg_url - 1, i); - const char *description = get_amxstring(amx, params[arg_description], arg_description - 1, i); #if defined BINLOG_ENABLED g_BinLog.WriteOp(BinLog_Registered, a->getId(), title, vers); @@ -1416,8 +1414,15 @@ static cell AMX_NATIVE_CALL register_plugin(AMX *amx, cell *params) /* 5 param * a->setTitle(title); a->setVersion(vers); a->setAuthor(author); - a->setUrl(url); - a->setDescription(description); + + if (params[arg_count] / sizeof(cell) > arg_author) + { + const char *url = get_amxstring(amx, params[arg_url], arg_url - 1, i); + const char *description = get_amxstring(amx, params[arg_description], arg_description - 1, i); + + a->setUrl(url); + a->setDescription(description); + } /* Check if we need to add fail counters */ i = 0;