From 83d63a274a9bcc4e3e1296ff9fec338abb288732 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 22 Jul 2022 23:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=89=A9=E5=93=81=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E8=BF=94=E5=9B=9E=E7=A9=BA=E5=AF=B9=E8=B1=A1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/items/modelitems.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index 604ed5c91..c522c4d02 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -125,7 +125,7 @@ func (this *ModelItemsComp) AddItemToUserPack(uId string, itemId int32, addnum i this.module.Errorf("err:%v", err) return } - change = make([]*pb.DB_UserItemData, len(itmes)) + change = make([]*pb.DB_UserItemData, 0) add, update, del, leftnum = this.addItemToUserPack(uId, itmes, itemId, addnum) if leftnum < 0 { err = ItemNotEnoughError