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
This commit is contained in:
IgnacioDM 2016-12-31 18:59:13 -03:00
parent e3ae451c09
commit 88ebb32f39

View File

@ -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;
}