mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 14:58:06 +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)
|
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;
|
return b->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user