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

Đã đóng
%! (template.HTML=2 năm trước cách đây)đang mở bởi image · 2 ý kiến

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 đã nhận xét 2 năm trước cách đây
Chủ sở hữu

Fixed pending git update.

Fixed pending git update.
devn00b đã nhận xét 2 năm trước cách đây
Chủ sở hữu

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.
Đăng nhập để tham gia bình luận.
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.