revid/revid.go: break if the given saturation or brightness vars are invalid

This commit is contained in:
Saxon 2019-10-26 08:24:53 +10:30
parent 21493cf969
commit 7dac9799be
1 changed files with 2 additions and 0 deletions

View File

@ -433,12 +433,14 @@ func (r *Revid) Update(vars map[string]string) error {
s, err := strconv.ParseInt(value, 10, 0)
if err != nil {
r.config.Logger.Log(logger.Warning, pkg+"invalid saturation param", "value", value)
break
}
r.config.Saturation = int(s)
case "Brightness":
b, err := strconv.ParseUint(value, 10, 0)
if err != nil {
r.config.Logger.Log(logger.Warning, pkg+"invalid brightness param", "value", value)
break
}
r.config.Brightness = uint(b)
case "Exposure":