Commit 1294f14f authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

image/png: fix error message to not return width twice

Fixes #5413

R=golang-dev, dave, adg
CC=golang-dev
https://golang.org/cl/9153045
parent a21b36da
......@@ -436,7 +436,7 @@ func Encode(w io.Writer, m image.Image) error {
// also rejected.
mw, mh := int64(m.Bounds().Dx()), int64(m.Bounds().Dy())
if mw <= 0 || mh <= 0 || mw >= 1<<32 || mh >= 1<<32 {
return FormatError("invalid image size: " + strconv.FormatInt(mw, 10) + "x" + strconv.FormatInt(mw, 10))
return FormatError("invalid image size: " + strconv.FormatInt(mw, 10) + "x" + strconv.FormatInt(mh, 10))
}
var e encoder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment