diff --git a/src/chess_board.cpp b/src/chess_board.cpp index da87125..53ec901 100644 --- a/src/chess_board.cpp +++ b/src/chess_board.cpp @@ -386,8 +386,14 @@ static void Mark_Potential_Moves(uint8_t piece, uint8_t column, uint8_t row) } pawn_move(temp_row, column); - pawn_take(temp_row, column - 1u, piece); - pawn_take(temp_row, column + 1u, piece); + if(column != 0) + { + pawn_take(temp_row, column - 1u, piece); + } + if(column != 7u) + { + pawn_take(temp_row, column + 1u, piece); + } break; }