tiff: fix shadowed err variable.
Fixes golang/go#10395 Change-Id: Ice768df7bb0bdac979d49328bfdf0d6713a1e7c3 Reviewed-on: https://go-review.googlesource.com/9264 Reviewed-by: Nigel Tao <nigeltao@golang.org>
This commit is contained in:
parent
24b0de15f1
commit
f681781743
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user