The probing code for the Polyglot book corrected moves like e1h1,
which could be a castling in the KxR notation that UCI uses for Chess960,
to compliant CECP notation (e1g1). But it also did that for Rook or Queen
moves that were not castlings at all. Now we test for a King on the
from-square before doing this.
     }
 
     if(gameInfo.variant != VariantNormal) return;
+    p = boards[currentMove][fr][ff];
+    if(p != WhiteKing && p != BlackKing) return; // not a castling
 
     // correct FRC-style castlings in variant normal.
-    // [HGM] This is buggy code! e1h1 could very well be a normal R or Q move.
     if(!strcmp(move_s,"e1h1")){
       safeStrCpy(move_s,"e1g1", 6);
     }else  if(!strcmp(move_s,"e1a1")){