Skip to content

Commit

Permalink
tiff: fix shadowed err variable.
Browse files Browse the repository at this point in the history
Fixes golang/go#10395

Change-Id: Ice768df7bb0bdac979d49328bfdf0d6713a1e7c3
Reviewed-on: https://go-review.googlesource.com/9264
Reviewed-by: Nigel Tao <[email protected]>
  • Loading branch information
egorovcharenko9 committed Dec 24, 2022
1 parent 744ab93 commit c4a7b56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tiff/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ func Decode(r io.Reader) (img image.Image, err error) {
d.buf, err = ioutil.ReadAll(r)
r.Close()
case cDeflate, cDeflateOld:
r, err := zlib.NewReader(io.NewSectionReader(d.r, offset, n))
var r io.ReadCloser
r, err = zlib.NewReader(io.NewSectionReader(d.r, offset, n))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c4a7b56

Please sign in to comment.