mirror of https://github.com/vinc/moros.git
Fix panic in chess move parser (#446)
This commit is contained in:
parent
731ac18640
commit
6a75ff23a1
|
@ -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] {
|
||||
|
|
Loading…
Reference in New Issue