From 1724d4bdd309e4ac25e27150510fd4ad8df169d6 Mon Sep 17 00:00:00 2001 From: OciXCrom Date: Fri, 3 Aug 2018 14:37:23 +0200 Subject: [PATCH] Update newmenus.cpp --- amxmodx/newmenus.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/amxmodx/newmenus.cpp b/amxmodx/newmenus.cpp index 0f5b333c..58b443e3 100755 --- a/amxmodx/newmenus.cpp +++ b/amxmodx/newmenus.cpp @@ -1122,14 +1122,14 @@ static cell AMX_NATIVE_CALL menu_getprop(AMX *amx, cell *params) } case MPROP_EXITNAME: { - if(pMenu->m_NeverExit == false && pMenu->m_ForceExit == false) - return 1; - else if(pMenu->m_NeverExit == false && pMenu->m_ForceExit == true) - return 2; - else if(pMenu->m_NeverExit == true && pMenu->m_ForceExit == false) - return -1; + if (len < 4) + { + LogError(amx, AMX_ERR_NATIVE, "Expected 4 parameters"); + return 0; + } - return 0; + set_amxstring(amx, params[3], pMenu->m_OptNames[abs(MENU_EXIT)].chars(), params[4]); + break; } case MPROP_TITLE: {