summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chess.c b/chess.c
index f27673f..a0e2e41 100644
--- a/chess.c
+++ b/chess.c
@@ -546,12 +546,12 @@ void for_each_move(const struct chess_ctx *ctx,
int opp = piece->color == WHITE ? 1 : 0;
if(valid_coords(y + dy, x + 1) && ctx->en_passant[opp][x + 1])
{
- if(!gen_and_call(ctx, y + dy, x, dy, 1, cb, data, enforce_check))
+ if(!gen_and_call(ctx, y, x, dy, 1, cb, data, enforce_check))
return;
}
if(valid_coords(y + dy, x - 1) && ctx->en_passant[opp][x - 1])
{
- if(!gen_and_call(ctx, y + dy, x, dy, -1, cb, data, enforce_check))
+ if(!gen_and_call(ctx, y, x, dy, -1, cb, data, enforce_check))
return;
}
}