Skip to content

Commit

Permalink
Skip index parameters in prop search (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingborehaha authored Jan 11, 2024
1 parent 164565c commit 681756c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Andre/SoulsFormats/SoulsFormats/Util/PropFinderUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ private record PropData(PropertyInfo PropInfo, object Obj);
{
foreach (PropertyInfo p in obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
{
if (p.GetIndexParameters().Length > 0)
continue;

if (onlyCheckPropName)
{
if (p.Name.ToLower() == prop.Name.ToLower())
Expand Down Expand Up @@ -85,6 +88,9 @@ private record PropData(PropertyInfo PropInfo, object Obj);

foreach (var p in obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
{
if (p.GetIndexParameters().Length > 0)
continue;

if (p.PropertyType.IsNested)
{
var pp = FindProperty(prop, p.GetValue(obj), classIndex);
Expand Down

0 comments on commit 681756c

Please sign in to comment.