Skip to content

Commit

Permalink
FIX: special characters in set name causing crash
Browse files Browse the repository at this point in the history
Makes loadout matching logic use plain text pattern finding to allow use of reserved characters in set names.
  • Loading branch information
Paliak committed Nov 8, 2024
1 parent 78b52c9 commit 42eddce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Modules/Build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,11 @@ function buildMode:SyncLoadouts()
local linkMatch = string.match(treeName, "%{(%w+)%}") or treeName
if linkMatch then
local skillName = self.skillsTab.skillSets[self.skillsTab.activeSkillSetId].title or "Default"
local skillMatch = oneSkill or skillName:find(linkMatch)
local skillMatch = oneSkill or skillName:find(linkMatch, 1, true)
local itemName = self.itemsTab.itemSets[self.itemsTab.activeItemSetId].title or "Default"
local itemMatch = oneItem or itemName:find(linkMatch)
local itemMatch = oneItem or itemName:find(linkMatch, 1, true)
local configName = self.configTab.configSets[self.configTab.activeConfigSetId].title or "Default"
local configMatch = oneConfig or configName:find(linkMatch)
local configMatch = oneConfig or configName:find(linkMatch, 1, true)

if skillMatch and itemMatch and configMatch then
self.controls.buildLoadouts:SetSel(i)
Expand Down

0 comments on commit 42eddce

Please sign in to comment.