Fix bug in storing time of first move
authorH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 25 Nov 2016 21:59:35 +0000 (22:59 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 13 Jan 2017 15:39:23 +0000 (16:39 +0100)
commit0560406e1440775b2158051b2c13324e5be7ee78
treeb68a4e0388737d134cea3db82c37b1080a9364a8
parente30a78284219ac19697175114c16740c7aab850b
Fix bug in storing time of first move

TwoMachinesEvent() reset the clocks for re-calculating time odds (as the
first engine would play white, while any previous Reset() would have
assumed it played black). But it did not save the start time in the
tmeReamaining array. Actually TwoMachinesEvent() was not supposed to
unconditionally reset the clocks, and this bug was introduced when the
ResetClocks was moved out of the conditional, separating it from saving
the start times. It is nowput back inside the conditional, but the
condition is now also incorporating the case TwoMachineEvent() was called
at the start of a game (i.e. no moves done). When used to resume a game
in progress it keeps the existing clocks (except for engines that do not
support time/otim).
backend.c