]> git.sesse.net Git - remoteglot/commitdiff
Fix a problem where invalid PVs would not be detected, leading to client crashes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Nov 2016 17:59:42 +0000 (18:59 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Nov 2016 17:59:42 +0000 (18:59 +0100)
remoteglot.pl

index 52eae900e98dc52aa070d4b5eac3fa8c7436b79e..6443c3159d56b916d69b5a84df5e167c997ffac7 100755 (executable)
@@ -526,7 +526,7 @@ sub prettyprint_pv_no_cache {
 sub prettyprint_pv {
        my ($pos, @pvs) = @_;
 
 sub prettyprint_pv {
        my ($pos, @pvs) = @_;
 
-       my $cachekey = join('', @pvs);
+       my $cachekey = $pos->{'fen'} . join('', @pvs);
        if (exists($pos->{'prettyprint_cache'}{$cachekey})) {
                return @{$pos->{'prettyprint_cache'}{$cachekey}};
        } else {
        if (exists($pos->{'prettyprint_cache'}{$cachekey})) {
                return @{$pos->{'prettyprint_cache'}{$cachekey}};
        } else {