fix: bounds check on column

This commit is contained in:
2025-11-17 12:10:56 -05:00
Unverified
parent cad12f7e99
commit 2e89cfbde7

View File

@@ -191,6 +191,11 @@ async fn handle_connection(
// Check if valid move // Check if valid move
if let Ok(column) = column_parse { if let Ok(column) = column_parse {
if column >= 6 {
let _ = send(&tx, "ERROR:INVALID:MOVE");
continue;
}
if current_match.board[column][4] != Color::None { if current_match.board[column][4] != Color::None {
let _ = send(&tx, "ERROR:INVALID:MOVE"); let _ = send(&tx, "ERROR:INVALID:MOVE");
continue; continue;