* fixed bitshift by negative number issue when evaluating spell MiscValues

* defined upper limit for localeIds and also discard negative localeIds
* fixed eval error when parsing spell descriptions. Calculated numbers sadly can't be localized.
This commit is contained in:
Sarjuuk
2021-10-12 21:44:59 +02:00
parent ea25776225
commit fca627c408
4 changed files with 6 additions and 4 deletions

View File

@@ -253,8 +253,9 @@ if (!CLI)
// all strings attached..
if (!empty($AoWoWconf['aowow']))
{
if (isset($_GET['locale']) && (CFG_LOCALES & (1 << (int)$_GET['locale'])))
User::useLocale($_GET['locale']);
if (isset($_GET['locale']) && (int)$_GET['locale'] <= MAX_LOCALES && (int)$_GET['locale'] >= 0)
if (CFG_LOCALES & (1 << $_GET['locale']))
User::useLocale($_GET['locale']);
Lang::load(User::$localeString);
}