fix: potential infinite loop when exporting game crash info..
This commit is contained in:
@@ -28,6 +28,7 @@ import java.io.UncheckedIOException;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@@ -41,7 +42,10 @@ public final class LogExporter {
|
|||||||
List<String> versions = new ArrayList<>();
|
List<String> versions = new ArrayList<>();
|
||||||
|
|
||||||
String currentVersionId = versionId;
|
String currentVersionId = versionId;
|
||||||
|
HashSet<String> resolvedSoFar = new HashSet<>();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (resolvedSoFar.contains(currentVersionId)) break;
|
||||||
|
resolvedSoFar.add(currentVersionId);
|
||||||
Version currentVersion = gameRepository.getVersion(currentVersionId);
|
Version currentVersion = gameRepository.getVersion(currentVersionId);
|
||||||
versions.add(currentVersionId);
|
versions.add(currentVersionId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user