1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00

Fix height option check

This commit is contained in:
DarthSim 2019-05-08 20:51:52 +06:00
parent bd95447ca5
commit a03d74288f

View File

@ -296,7 +296,7 @@ func applyHeightOption(po *processingOptions, args []string) error {
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
} else {
return fmt.Errorf("Invalid height: %s", args[0])