summaryrefslogtreecommitdiff
path: root/src/pkg/image
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2013-05-06 09:59:33 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2013-05-06 09:59:33 -0700
commitecd337d76ca167da8ba72e57e59028262d4092a2 (patch)
treed2e064673cb8511e39adb44b1b1cbdd329975793 /src/pkg/image
parent71482d0460e42bb8d4fff9d524410ff94b08cca0 (diff)
downloadgo-ecd337d76ca167da8ba72e57e59028262d4092a2.tar.gz
image/png: fix error message to not return width twice
Fixes issue 5413 R=golang-dev, dave, adg CC=golang-dev https://codereview.appspot.com/9153045
Diffstat (limited to 'src/pkg/image')
-rw-r--r--src/pkg/image/png/writer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/image/png/writer.go b/src/pkg/image/png/writer.go
index 093d47193..629452cbf 100644
--- a/src/pkg/image/png/writer.go
+++ b/src/pkg/image/png/writer.go
@@ -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