Fix locale-dependent code in GameTest ()

Co-authored-by: modmuss <modmuss50@gmail.com>
This commit is contained in:
apple502j 2025-02-21 02:55:24 +09:00 committed by GitHub
parent fd5bf1a075
commit cb3258dead
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions
fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/context

View file

@ -20,6 +20,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
@ -427,7 +428,7 @@ public final class ClientGameTestContextImpl implements ClientGameTestContext {
throw new AssertionError("Failed to create screenshots directory", e);
}
String counterPrefix = options.counterPrefix ? "%04d_".formatted(screenshotCounter++) : "";
String counterPrefix = options.counterPrefix ? String.format(Locale.ROOT, "%04d_", screenshotCounter++) : "";
Path screenshotFile = destinationDir.resolve(counterPrefix + fileName + ".png");
try {