Skip to content

Commit

Permalink
Fixed array range crash
Browse files Browse the repository at this point in the history
Fixed a crash where an array was being checked beyond its bounds to find the first X common elements with another array.
  • Loading branch information
Daekesh committed Oct 20, 2024
1 parent 2f1aa6a commit 380c094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/GFPakExporter/Private/AuroraExporterSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ FString FAuroraContentDLCExporterConfig::GetDefaultDLCNameBasedOnContent(const F
auto GetCommonPath = [](const TArray<FString>& Path1, const TArray<FString>& Path2)
{
TArray<FString> PathArray;
int Max = FMath::Max(Path1.Num(), Path2.Num());
for (int i = 0; i < Max; i++)
int32 Min = FMath::Min(Path1.Num(), Path2.Num());
for (int i = 0; i < Min; i++)
{
if (Path1[i] == Path2[i])
{
Expand Down

0 comments on commit 380c094

Please sign in to comment.