fix: bounds check on column
This commit is contained in:
1 parent
cad12f7e99
commit
2e89cfbde7
1 file changed
+5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user