]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Strip whitespace from beginning of string sent to set_option_value().
[stockfish] / src / uci.cpp
index 0a1de3127ae8aa167d6db35032549ee3e5329ac9..1f1ba096ca6aa38edf39889d5e359dc07c96f9e9 100644 (file)
@@ -242,6 +242,11 @@ namespace {
         }
         if (token == "value")
         {
+            // Skip whitespace. There should be a better way to do this, but
+            // I don't know how...
+            while(isspace(uip.get()));
+            uip.unget();
+
             getline(uip, token); // reads until end of line
             set_option_value(name, token);
         } else