diff --git a/src/chess/uciloop.cc b/src/chess/uciloop.cc index 4135895965..0c6e76f1c1 100644 --- a/src/chess/uciloop.cc +++ b/src/chess/uciloop.cc @@ -153,8 +153,13 @@ bool UciLoop::DispatchCommand( } else if (command == "isready") { CmdIsReady(); } else if (command == "setoption") { +if (GetOrEmpty(params, "name").empty()) { + throw Exception("setoption requires name"); + } + else { CmdSetOption(GetOrEmpty(params, "name"), GetOrEmpty(params, "value"), GetOrEmpty(params, "context")); + } } else if (command == "ucinewgame") { CmdUciNewGame(); } else if (command == "position") {