Handle clocks that enter the PGN after the move do.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 6 Aug 2017 20:10:45 +0000 (22:10 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 6 Aug 2017 20:10:45 +0000 (22:10 +0200)
remoteglot.pl

index 699968f..5d907d8 100755 (executable)
@@ -346,6 +346,9 @@ sub handle_position {
        # ignore it.
        if (defined($pos_calculating) && $pos->fen() eq $pos_calculating->fen()) {
                $pos_calculating->{'result'} = $pos->{'result'};
+               for my $key ('white_clock', 'black_clock', 'white_clock_target', 'black_clock_target') {
+                       $pos_calculating->{$key} //= $pos->{$key};
+               }
                return;
        }