diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 78ef34d6..1253b5d2 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -145,9 +145,10 @@ int FF_ChangeLevel = -1; bool ColoredMenus(String & ModName) { - const char * pModNames[] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + static const char * pModNames[] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + static const size_t ModsCount = sizeof(pModNames) / sizeof(const char *); - for (int Iterator = 0u; Iterator < sizeof(pModNames) / sizeof(const char *); ++Iterator) + for (int Iterator = 0u; Iterator < ModsCount; ++Iterator) { if (ModName.compare(pModNames[Iterator]) == 0u) return true; // this game modification currently supports colored menus