Fix panic in chess move parser (#446)

This commit is contained in:
Vincent Ollivier 2022-11-30 23:26:35 +01:00 committed by GitHub
parent 731ac18640
commit 6a75ff23a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ impl Chess {
fn is_move(m: &str) -> bool {
let m = m.as_bytes();
let n = m.len();
if n < 3 || 5 < n {
if n < 4 || 5 < n {
return false;
}
if m[0] < b'a' || b'h' < m[0] {