mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
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:
parent
e3ae451c09
commit
88ebb32f39
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user