Implement fix for Blueprints causing crashes

Blueprints can't be mapped out, so I have disabled the parsing of them, so they return empty json information.
This commit is contained in:
GMatrixGames 2020-11-21 15:49:11 -05:00 committed by GitHub
parent b5c6137fda
commit ded4c7a749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -164,25 +164,33 @@ namespace FModel.PakReader.Parsers
}
else
{
_dataExports[i] = null;
_dataExports[i] = new UObject();
_dataExportTypes[i] = exportType;
#if DEBUG
var header = new FUnversionedHeader(this);
using var it = new FIterator(header);
FConsole.AppendText(string.Concat("\n", exportType.String, ": ", Summary.Name.String), "#CA6C6C", true);
do
try
{
FConsole.AppendText($"Val: {it.Current.Val} (IsNonZero: {it.Current.IsNonZero})", FColors.Yellow, true);
var header = new FUnversionedHeader(this);
using var it = new FIterator(header);
FConsole.AppendText(string.Concat("\n", exportType.String, ": ", Summary.Name.String), "#CA6C6C", true);
do
{
FConsole.AppendText($"Val: {it.Current.Val} (IsNonZero: {it.Current.IsNonZero})", FColors.Yellow, true);
}
while (it.MoveNext());
}
catch (FileLoadException e)
{
continue;
}
while (it.MoveNext());
#endif
}
currentExportDataOffset += (int) exportMapEntry.CookedSerialSize;
}
}
public override string ToString() => Summary.Name.String;
}
}
}