Fix a range error exception

face-detect
Noah Petherbridge 2023-07-22 14:50:20 -07:00
parent 356f94698f
commit 27fc1c58dd
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ func ParseCropCoords(coords string) []int {
}
// If either the width or height would be zero, the coords aren't valid.
if coords[2] == 0 || coords[3] == 0 {
if len(coords) == 4 && coords[2] == 0 || coords[3] == 0 {
return nil
}
return crop