Fixed problem in PGN parser when parsing moves like h1Q. Changing it to h1=Q

This commit is contained in:
Alf Magne Kalleland
2013-02-15 14:19:41 +01:00
parent 3d6e0ae60b
commit 93da7b53f5

View File

@@ -21,6 +21,7 @@ class MoveBuilder {
if(!$move || $move == '..' || $move == '*' || strstr($move, '1-') || strstr($move, '-1') || strstr($move, '1/2')){
return;
}
$move = preg_replace("/^([a-h])([18])([QRNB])$/", "$1$2=$3", $move );
$this->moveReferences[$this->pointer][] = array(CHESS_JSON::MOVE_NOTATION => $move);
$this->currentIndex ++;
}