From 2e89cfbde785f5de2920aee38c3200c169a7b964 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Mon, 17 Nov 2025 12:10:56 -0500 Subject: [PATCH] fix: bounds check on column --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 371266a..5633c55 100644 --- a/src/main.rs +++ b/src/main.rs @@ -191,6 +191,11 @@ async fn handle_connection( // Check if valid move if let Ok(column) = column_parse { + if column >= 6 { + let _ = send(&tx, "ERROR:INVALID:MOVE"); + continue; + } + if current_match.board[column][4] != Color::None { let _ = send(&tx, "ERROR:INVALID:MOVE"); continue;