From f501b24b8886605949cd9b7880b8e4ce8e866e9d Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Wed, 7 Dec 2022 17:33:21 -0800 Subject: fixed a bug in the remove_vectors function --- chess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chess.c') diff --git a/chess.c b/chess.c index 099c78c..a0904df 100644 --- a/chess.c +++ b/chess.c @@ -236,7 +236,7 @@ vectorp_t get_moves_final(int** board, vector_t position, piece_t piece) { //remove the piece from where it was tempBoard[position.mx][position.my] = 0; if(is_in_check(tempBoard, color)) { - invalidMoves[invalidMovesCount]; + invalidMoves[invalidMovesCount] = i; invalidMovesCount++; } free(tempBoard); -- cgit v1.3.1