From 88ebb32f3970e035accf988fa46b409b117c1d01 Mon Sep 17 00:00:00 2001 From: IgnacioDM Date: Sat, 31 Dec 2016 18:59:13 -0300 Subject: [PATCH] Fix ancient register_menuid bug, using strstr instead of strcmp If you registered a menu whose title was a superset of an already registered menu, it wouldn't register a new handler but use the handler of the subset title menu --- amxmodx/CMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amxmodx/CMenu.cpp b/amxmodx/CMenu.cpp index 9be097cc..9053349a 100755 --- a/amxmodx/CMenu.cpp +++ b/amxmodx/CMenu.cpp @@ -34,7 +34,7 @@ int MenuMngr::findMenuId(const char* name, AMX* amx) { for (MenuIdEle* b = headid; b; b = b->next) { - if ((!amx || !b->amx || amx == b->amx) && strstr(name,b->name.chars())) + if ((!amx || !b->amx || amx == b->amx) && !strcmp(name, b->name.chars())) return b->id; }