mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-11 12:42:29 +02:00
Fix height option check
This commit is contained in:
@@ -296,7 +296,7 @@ func applyHeightOption(po *processingOptions, args []string) error {
|
|||||||
return fmt.Errorf("Invalid height arguments: %v", args)
|
return fmt.Errorf("Invalid height arguments: %v", args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if h, err := strconv.Atoi(args[0]); err == nil && po.Height >= 0 {
|
if h, err := strconv.Atoi(args[0]); err == nil && h >= 0 {
|
||||||
po.Height = h
|
po.Height = h
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Invalid height: %s", args[0])
|
return fmt.Errorf("Invalid height: %s", args[0])
|
||||||
|
Reference in New Issue
Block a user