]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Revert "Fix a null pointer exception in the frontend."
[remoteglot] / remoteglot.pl
index 7097306fecfd3795c407392164fcda012c5de1ed..9cbf820d5dcd336d5e0bff16d118da711462e84f 100755 (executable)
@@ -67,7 +67,7 @@ select(TBLOG);
 $| = 1;
 
 select(STDOUT);
-umask 0027;  # analysis.json should not be served to users.
+umask 0022;  # analysis.json should not be served to users.
 
 # open the chess engine
 my $engine = open_engine($remoteglotconf::engine_cmdline, 'E1', sub { handle_uci(@_, 1); });
@@ -533,7 +533,7 @@ sub prettyprint_pv_no_cache {
 sub prettyprint_pv {
        my ($pos, @pvs) = @_;
 
-       my $cachekey = $pos->{'fen'} . join('', @pvs);
+       my $cachekey = $pos->fen() . join('', @pvs);
        if (exists($pos->{'prettyprint_cache'}{$cachekey})) {
                return @{$pos->{'prettyprint_cache'}{$cachekey}};
        } else {