]> git.sesse.net Git - stockfish/commitdiff
Fix UCI 'button' options
authorMarco Costalba <mcostalba@gmail.com>
Sat, 17 Mar 2012 09:29:33 +0000 (10:29 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 17 Mar 2012 09:35:01 +0000 (10:35 +0100)
When a button fires UCIOption::operator=() is called and from
there the on_change() function. Now it happens that in case of
a button the on_change() function resets option's value to
"false" triggering again UCIOption::operator=() that calls again
on_change() and so on in an endless loop that is experienced
by the user as an application hang.

Rework the button logic to fix the issue and also be more clear
about how button works.

Reported by several people working with Scid and tracked down
to the "Clear Hash" UCI button by Steven Atkinson.

Bug recently introduced by 2ef5b4066e649.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found