FModel 3.1.0.5

This commit is contained in:
iAmAsval 2020-06-17 22:52:04 +02:00
parent 3ff24995c0
commit aa3a7fc0c4

View File

@ -81,10 +81,15 @@ namespace PakReader.Pak
public T GetIndexedExport<T>(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;
}