diff --git a/pkg/photo/upload.go b/pkg/photo/upload.go index 0d893a7..37d9d9f 100644 --- a/pkg/photo/upload.go +++ b/pkg/photo/upload.go @@ -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