Use embedded net when UCI option EvalFile has empty value

This commit is contained in:
Peter Osterlund 2021-02-20 13:44:26 +01:00
parent 16d09453b9
commit 2fd84a648c

View File

@ -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));