]> git.sesse.net Git - remoteglot/blobdiff - Board.pm
Do not stop polling PGNs if they are invalid.
[remoteglot] / Board.pm
index 2edc07de0c61a37b93ebee9e5aadd73fe29985e2..39c8134096b5897a0e7bd0ff47baad0441fe310f 100644 (file)
--- a/Board.pm
+++ b/Board.pm
@@ -200,8 +200,11 @@ sub parse_pretty_move {
                        push @squares, [ $row, $col ];
                }
        }
+       if (scalar @squares == 0) {
+               die "Impossible move $move";
+       }
        if (scalar @squares != 1) {
-               die "Ambigious or impossible move $move";
+               die "Ambigious move $move";
        }
        return (@{$squares[0]}, $to_row, $to_col, $promo);
 }