From 2fd84a648c299eceeba66dc59a445daede98a06e Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Sat, 20 Feb 2021 13:44:26 +0100 Subject: [PATCH] Use embedded net when UCI option EvalFile has empty value --- .../java/org/petero/droidfish/engine/InternalStockFish.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/engine/InternalStockFish.java b/DroidFishApp/src/main/java/org/petero/droidfish/engine/InternalStockFish.java index 98e3fd5..b2cd280 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/engine/InternalStockFish.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/engine/InternalStockFish.java @@ -165,7 +165,8 @@ public class InternalStockFish extends ExternalEngine { * pointing to the network file embedded in DroidFish. */ @Override public boolean setOption(String name, String value) { - if (name.toLowerCase(Locale.US).equals(netOption) && defaultNet.equals(value)) { + if (name.toLowerCase(Locale.US).equals(netOption) && + (defaultNet.equals(value) || value.isEmpty())) { getUCIOptions().getOption(name).setFromString(value); value = defaultNetFile.getAbsolutePath(); writeLineToEngine(String.format(Locale.US, "setoption name %s value %s", name, value));