Fixed intermittent crashes in clientprefs (bug 4660, r=psychonic).
This commit is contained in:
parent
e2340363e3
commit
618eb254c0
@ -396,7 +396,7 @@ void CookieManager::OnPluginDestroyed(IPlugin *plugin)
|
|||||||
{
|
{
|
||||||
ItemDrawInfo draw;
|
ItemDrawInfo draw;
|
||||||
const char *info = clientMenu->GetItemInfo(i, &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)
|
if (data->handler->forward != NULL)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ void ClientMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int i
|
|||||||
|
|
||||||
const char *info = menu->GetItemInfo(item, &draw);
|
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)
|
if (data->handler->forward != NULL)
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ unsigned int ClientMenuHandler::OnMenuDisplayItem(IBaseMenu *menu,
|
|||||||
|
|
||||||
const char *info = menu->GetItemInfo(item, &draw);
|
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)
|
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);
|
const char *info = menu->GetItemInfo(item, &draw);
|
||||||
|
|
||||||
AutoMenuData *data = (AutoMenuData *)strtol(info, NULL, 16);
|
AutoMenuData *data = (AutoMenuData *)strtoul(info, NULL, 16);
|
||||||
|
|
||||||
switch (data->type)
|
switch (data->type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user