summaryrefslogtreecommitdiff
path: root/chess-pgn.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-pgn.el')
-rw-r--r--chess-pgn.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/chess-pgn.el b/chess-pgn.el
index ae0adc3..930edc5 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -64,10 +64,11 @@
(goto-char (match-end 0)))
(let ((fen (chess-game-tag game "FEN")))
(chess-game-set-plies
- game (chess-pgn-read-plies
- game (if fen
- (chess-fen-to-pos fen)
- (chess-pos-copy chess-starting-position)) t)))
+ game (or (chess-pgn-read-plies
+ game (if fen
+ (chess-fen-to-pos fen)
+ (chess-pos-copy chess-starting-position)) t)
+ (list (chess-ply-create (chess-fen-to-pos fen))))))
game)))
(defun chess-pgn-insert-annotations (game index ply)