]> git.cworth.org Git - loudgame/commitdiff
Allow leading whitespace for move string
authorCarl Worth <cworth@cworth.org>
Mon, 3 Mar 2008 20:03:02 +0000 (12:03 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 3 Mar 2008 20:03:02 +0000 (12:03 -0800)
loa-board.c

index e630519cbfd81d7406c94e24892e019f0f62e8d7..b4d13bc218cf610e70ab50879c777e8a65037394 100644 (file)
@@ -71,7 +71,7 @@ loa_move_init_from_string (loa_move_t *move, const char *string)
     move->y2 = 0;
     move->is_capture = 0;
 
-    matched = sscanf (string, "%c%d%c%c%d", &xc1, &y1, &sep, &xc2, &y2);
+    matched = sscanf (string, " %c%d%c%c%d", &xc1, &y1, &sep, &xc2, &y2);
     if (matched != 5)
        return FALSE;