summaryrefslogtreecommitdiff
path: root/chess-scid.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-01 23:19:52 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-01 23:19:52 -0400
commite4e4d873613a831e88c6fa8a96ccec262c8950f6 (patch)
tree01ba85ea94b2ddf17d6df034b0a3f7da442c7548 /chess-scid.el
parentfce469f0c29ff33957ee2ed7a1a7b591203661e6 (diff)
chess-scid now accepts a 0-based index, but uses a 1-based index when talking
to ChessDB.
Diffstat (limited to 'chess-scid.el')
-rw-r--r--chess-scid.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/chess-scid.el b/chess-scid.el
index f622a52..8da54a7 100644
--- a/chess-scid.el
+++ b/chess-scid.el
@@ -75,7 +75,7 @@
;; can accumulate without bound during running of the validation tests
(erase-buffer)
(process-send-string chess-scid-process
- (format "sc_game load %d\n" (car args)))
+ (format "sc_game load %d\n" (1+ (car args))))
(accept-process-output chess-scid-process)
(let ((here (point-max))
(iterations 10)
@@ -90,7 +90,7 @@
(setq found t))))
(accept-process-output chess-scid-process 1 0 t))
(if (not found)
- (chess-error 'failed-load (car args))
+ (chess-error 'failed-load (1+ (car args)))
(setq iterations 10 found nil here (point))
(while (and (> (setq iterations (1- iterations)) 0)
(not (and (re-search-forward "\\(\\*\\|1-0\\|0-1\\|1/2-1/2\\)" nil t)
@@ -98,7 +98,7 @@
(setq found t))))
(accept-process-output chess-scid-process 1 0 t))
(if (not found)
- (chess-error 'failed-find-end (car args))
+ (chess-error 'failed-find-end (1+ (car args)))
(goto-char here)
(let ((game (chess-pgn-to-game)))
(when game
@@ -170,7 +170,7 @@
((eq event 'replace)
(unless (chess-scid-handler 'read-only-p)
- (let ((index (or (cadr args)
+ (let ((index (or (1+ (cadr args))
(chess-game-data (car args) 'database-index))))
(chess-scid-send
(format "sc_game import \"%s\""