fix(WishList): guard nil item[8] in legacy WishlistConvert (strsplit-on-nil crash)
All checks were successful
release / release (push) Successful in 4s
All checks were successful
release / release (push) Successful in 4s
This commit is contained in:
parent
59c35f2ec3
commit
646c3f3341
1 changed files with 8 additions and 4 deletions
|
|
@ -1148,8 +1148,10 @@ function AtlasLoot:WishlistConvert()
|
|||
for _, wList in ipairs(AtlasLootWishList.Own) do
|
||||
local itemList = {Icon = wList.Icon, Name = wList.Name}
|
||||
for _, item in ipairs (wList) do
|
||||
local dataID, dataSource, tableNum = strsplit("|", item[8])
|
||||
tinsert(itemList, {item[1], itemID = item[2], desc = item[5], lootTable = {{dataID, "AtlasLoot_Data", tonumber(tableNum) or 1}, "Source"} } )
|
||||
if item[8] then
|
||||
local dataID, dataSource, tableNum = strsplit("|", item[8])
|
||||
tinsert(itemList, {item[1], itemID = item[2], desc = item[5], lootTable = {{dataID, "AtlasLoot_Data", tonumber(tableNum) or 1}, "Source"} } )
|
||||
end
|
||||
end
|
||||
tinsert(rebuiltList, itemList)
|
||||
end
|
||||
|
|
@ -1162,8 +1164,10 @@ function AtlasLoot:WishlistConvert()
|
|||
for _, wList in ipairs(AtlasLootWishList.Shared) do
|
||||
local itemList = {Icon = wList.Icon, Name = wList.Name}
|
||||
for _, item in ipairs (wList) do
|
||||
local dataID, dataSource, tableNum = strsplit("|", item[8])
|
||||
tinsert(itemList, {item[1], itemID = item[2], desc = item[5], lootTable = {{dataID, "AtlasLoot_Data", tonumber(tableNum) or 1}, "Source"} } )
|
||||
if item[8] then
|
||||
local dataID, dataSource, tableNum = strsplit("|", item[8])
|
||||
tinsert(itemList, {item[1], itemID = item[2], desc = item[5], lootTable = {{dataID, "AtlasLoot_Data", tonumber(tableNum) or 1}, "Source"} } )
|
||||
end
|
||||
end
|
||||
tinsert(rebuiltList, itemList)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue