]> git.sesse.net Git - stockfish/commit
Strip whitespace from beginning of string sent to set_option_value().
authorTord Romstad <tord@glaurungchess.com>
Fri, 10 Jul 2009 16:34:56 +0000 (18:34 +0200)
committerTord Romstad <tord@glaurungchess.com>
Fri, 10 Jul 2009 16:34:56 +0000 (18:34 +0200)
commit174b40c28dd6f907ca093864ecaa73136694a7c5
treed2fe3fee75f70f4884a9b5ff1a4bb67c5fdb2699
parent03f524c591c90120302e127cd0c1adba4c498806
Strip whitespace from beginning of string sent to set_option_value().

It turned out that the input sent to set_option_value() when it is called by
set_option() in uci.cpp always started with at least one whitespace. In most
cases, this is not a problem, because the majority of UCI options have numeric
values. It did, however, cause a problem for UCI options with non-numerical
values, like options of type CHECK and COMBO. In particular, changing the
value of an option of type CHECK didn't work, because the comparisons with
"true" and "false" would always return false. This means that the "Ponder"
and "UCI_Chess960" options haven't been working for a while.
src/uci.cpp