Merged in break-bad-sat-or-bright (pull request #268)

revid/revid.go: break if the given saturation or brightness vars are invalid
This commit is contained in:
Saxon Milton 2019-10-25 21:57:47 +00:00
commit 8edfbeb369
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":