Skip to content

Commit 51da967

Browse files
github-actions[bot]unrealdreamzLocalIdentity
authored
[pob2-port] Fix crash when importing some builds to party tab (#9860)
* Apply changes from PathOfBuildingCommunity/PathOfBuilding-PoE2#1872 * Remove test --------- Co-authored-by: unrealdreamz <unrealdreamz@users.noreply.github.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 6bb623b commit 51da967

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/Classes/PartyTab.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,12 @@ function PartyTabClass:ParseBuffs(list, buf, buffType, label)
759759
for line in buf:gmatch("([^\n]*)\n?") do
760760
if line:find("=") then
761761
-- label is output for this type, as a special case
762-
if line:match("%.") then
763-
local k1, k2, v = line:match("([%w ]-%w+)%.([%w ]-%w+)=(.+)")
764-
label[k1] = {[k2] = tonumber(v)}
762+
local k1, k2, v = line:match("^([%w ]-%w+)%.([%w ]-%w+)=(.+)$")
763+
if k1 then
764+
if type(label[k1]) ~= "table" then
765+
label[k1] = { }
766+
end
767+
label[k1][k2] = tonumber(v)
765768
elseif line:match("|") then
766769
local k, tags, v = line:match("([%w ]-%w+)|(.+)=(.+)")
767770
v = tonumber(v)

0 commit comments

Comments
 (0)