shithub: hugo

Download patch

ref: 256418917c6642f7e5b3d3206ff4b6fa03b1cb28
parent: c84f506f8ef1f2ca94ab96718a22ba6e290235ac
author: Iskander (Alex) Sharipov <quasilyte@gmail.com>
date: Mon Dec 10 12:31:44 EST 2018

resource/image: Fix "always false" condition

Found using gocritic linter.

--- a/resource/image.go
+++ b/resource/image.go
@@ -376,7 +376,7 @@
 			if err != nil {
 				return c, err
 			}
-			if c.Quality < 1 && c.Quality > 100 {
+			if c.Quality < 1 || c.Quality > 100 {
 				return c, errors.New("quality ranges from 1 to 100 inclusive")
 			}
 		} else if part[0] == 'r' {
--