From: Steinar H. Gunderson Date: Sun, 14 Dec 2014 10:52:46 +0000 (+0100) Subject: Fix off-by-one in move history handling. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6b68ee08fb0cbb860316aaaa1ae6b6bba7bda64a;p=remoteglot-book Fix off-by-one in move history handling. --- diff --git a/www/js/book.js b/www/js/book.js index 47e540e..efb68e3 100644 --- a/www/js/book.js +++ b/www/js/book.js @@ -32,10 +32,10 @@ var update = function() { if (i % 2 == 0) { text += (i/2 + 1) + ". "; } - if (i == move_override) { + if (i + 1 == move_override) { text += '' + history[i] + ''; } else { - text += '' + history[i] + ''; + text += '' + history[i] + ''; } text += " "; }