#406 move inventory crashes when item doesn't exist in from_index slot

已关闭
image2 年之前创建 · 2 条评论
image 评论于 2 年之前

Commands.cpp:6552 need a item null check before item->details.item_locked

    else if(sep->arg[4][0] && strncasecmp("move", sep->arg[0], 4) == 0 && sep->IsNumber(1) && sep->IsNumber(2) && sep->IsNumber(3) && sep->IsNumber(4))
    {
        int16 from_index = atoi(sep->arg[1]);
        sint16 to_slot = atoi(sep->arg[2]);
        sint32 bag_id = atol(sep->arg[3]);
        int8 charges = atoi(sep->arg[4]);
        Item* item = client->GetPlayer()->item_list.GetItemFromIndex(from_index);

        if(item->details.item_locked)
        {
            client->SimpleMessage(CHANNEL_COLOR_RED, "You cannot move the item in use.");
            return;
        }
Commands.cpp:6552 need a item null check before item->details.item_locked else if(sep->arg[4][0] && strncasecmp("move", sep->arg[0], 4) == 0 && sep->IsNumber(1) && sep->IsNumber(2) && sep->IsNumber(3) && sep->IsNumber(4)) { int16 from_index = atoi(sep->arg[1]); sint16 to_slot = atoi(sep->arg[2]); sint32 bag_id = atol(sep->arg[3]); int8 charges = atoi(sep->arg[4]); Item* item = client->GetPlayer()->item_list.GetItemFromIndex(from_index); if(item->details.item_locked) { client->SimpleMessage(CHANNEL_COLOR_RED, "You cannot move the item in use."); return; }
devn00b 评论于 2 年之前
所有者

Fixed pending git update.

Fixed pending git update.
devn00b 评论于 2 年之前
所有者

54a61e0c39

I've seen, nor heard any further issues from this patch, closing related issues. I Will re-open if some problem pops back up.

https://git.eq2emu.com/devn00b/EQ2EMu/commit/54a61e0c391817e2e01cb5f93bc9fd8c13526afa I've seen, nor heard any further issues from this patch, closing related issues. I Will re-open if some problem pops back up.
devn00b2 年之前 关闭
登录 并参与到对话中。
正在加载...
取消
保存
这个人很懒,什么都没留下。