File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,12 @@ public static XivDependencyRootInfo ExtractRootInfo(string internalFilePath)
680
680
match = _slotRegex . Match ( internalFilePath ) ;
681
681
if ( match . Success )
682
682
{
683
- info . Slot = match . Groups [ 1 ] . Value ;
683
+ // Validate the slot name to avoid matching on arbitrary three letter strings that may be present
684
+ if ( XivItemTypes . GetAvailableSlots ( info . PrimaryType ) . Contains ( match . Groups [ 1 ] . Value )
685
+ || ( info . SecondaryType . HasValue && XivItemTypes . GetAvailableSlots ( info . SecondaryType . Value ) . Contains ( match . Groups [ 1 ] . Value ) ) )
686
+ {
687
+ info . Slot = match . Groups [ 1 ] . Value ;
688
+ }
684
689
}
685
690
}
686
691
else
Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ public string GetMaterialIdentifier()
508
508
public string GetItemTypeIdentifier ( )
509
509
{
510
510
// This regex feels a little janky, but it's good enough for now.
511
- var match = Regex . Match ( MTRLPath , "_([a-z]{3})_[a-z0-9]\\ .mtrl" ) ;
511
+ var match = Regex . Match ( MTRLPath , "_([a-z]{3})_[a-z0-9]+ \\ .mtrl" ) ;
512
512
if ( match . Success )
513
513
{
514
514
return "_" + match . Groups [ 1 ] . Value ;
You can’t perform that action at this time.
0 commit comments