From aa3a7fc0c4e2d1474cc8cb8ac980d1ffce719066 Mon Sep 17 00:00:00 2001 From: iAmAsval Date: Wed, 17 Jun 2020 22:52:04 +0200 Subject: [PATCH] FModel 3.1.0.5 --- FModel/PakReader/Pak/PakPackage.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/FModel/PakReader/Pak/PakPackage.cs b/FModel/PakReader/Pak/PakPackage.cs index f76cb848..97281e48 100644 --- a/FModel/PakReader/Pak/PakPackage.cs +++ b/FModel/PakReader/Pak/PakPackage.cs @@ -81,10 +81,15 @@ namespace PakReader.Pak public T GetIndexedExport(int index) where T : IUExport { var exports = Exports; + int foundCount = 0; for (int i = 0; i < exports.Length; i++) { - if (i == index && exports[i] is T) - return (T)exports[i]; + if (exports[i] is T) + { + if (foundCount == index) + return (T)exports[i]; + foundCount++; + } } return default; }