Use Single() over First() in reflection to ensure correct match

This commit is contained in:
Tyfon
2024-06-01 01:07:37 -07:00
parent c3d97b31c3
commit b8c9e01ead
4 changed files with 17 additions and 17 deletions

View File

@@ -442,7 +442,7 @@ namespace UIFixes
{
protected override MethodBase GetTargetMethod()
{
Type type = PatchConstants.EftTypes.First(t => t.GetMethod("CheckItemFilter", BindingFlags.Public | BindingFlags.Static) != null); // GClass2510
Type type = PatchConstants.EftTypes.Single(t => t.GetMethod("CheckItemFilter", BindingFlags.Public | BindingFlags.Static) != null); // GClass2510
return AccessTools.Method(type, "CheckItemFilter");
}