Fixed intermittent crashes in clientprefs (bug 4660, r=psychonic).

This commit is contained in:
Asher Baker 2012-05-29 17:41:48 +01:00
parent e2340363e3
commit 618eb254c0
2 changed files with 4 additions and 4 deletions

View File

@ -396,7 +396,7 @@ void CookieManager::OnPluginDestroyed(IPlugin *plugin)
{
ItemDrawInfo draw;
const char *info = clientMenu->GetItemInfo(i, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16);
AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL)
{

View File

@ -40,7 +40,7 @@ void ClientMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int i
const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16);
AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL)
{
@ -94,7 +94,7 @@ unsigned int ClientMenuHandler::OnMenuDisplayItem(IBaseMenu *menu,
const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16);
AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
if (data->handler->forward != NULL)
{
@ -122,7 +122,7 @@ void AutoMenuHandler::OnMenuSelect(SourceMod::IBaseMenu *menu, int client, unsig
const char *info = menu->GetItemInfo(item, &draw);
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16);
AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
switch (data->type)
{