From 7c106ea7120a60e4e71a59bb679fa9ce09fc241a Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 23 Mar 2016 20:27:55 +0100 Subject: [PATCH] Enable the tbprobe cache. --- remoteglot.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remoteglot.pl b/remoteglot.pl index 9439a4b..1b06f05 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -556,7 +556,7 @@ sub complete_using_tbprobe { my $key = join('', @pv); my @moves = (); if (exists($pos->{'tbprobe_cache'}{$key})) { - @moves = $pos->{'tbprobe_cache'}{$key}; + @moves = @{$pos->{'tbprobe_cache'}{$key}}; } else { if ($mpv ne '') { # Force doing at least one move of the PV. @@ -586,6 +586,8 @@ sub complete_using_tbprobe { ($pos, $uci_move) = $pos->make_pretty_move($move); push @moves, $uci_move; } + + $pos->{'tbprobe_cache'}{$key} = \@moves; } $info->{'pv' . $mpv} = \@moves; -- 2.39.2