From 6bde401b27dd87a407f95b29fff99ed681ab8a4c Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 21 Nov 2014 00:17:09 +0100 Subject: [PATCH 1/1] Unbreak history storing again. --- remoteglot.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remoteglot.pl b/remoteglot.pl index 6fc0e89..39a0f4b 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -741,9 +741,9 @@ sub output_json { my $encoded = JSON::XS::encode_json($json); atomic_set_contents($remoteglotconf::json_output, $encoded); - if (exists($pos_calculating->{'history'}) && + if (exists($pos_calculating->{'pretty_history'}) && defined($remoteglotconf::json_history_dir)) { - my $halfmove_num = scalar @{$pos_calculating->{'history'}}; + my $halfmove_num = scalar @{$pos_calculating->{'pretty_history'}}; (my $fen = $pos_calculating->fen()) =~ tr,/ ,-_,; my $filename = $remoteglotconf::json_history_dir . "/move$halfmove_num-$fen.json"; -- 2.39.2