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:
chai2010 2015-04-23 15:51:29 +08:00 committed by Nigel Tao
parent 24b0de15f1
commit f681781743

View File

@ -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
}