]> Cypherpunks repositories - gostls13.git/commitdiff
doc/articles/image_package.html: fix x/y mistake
authorRob Pike <r@golang.org>
Thu, 28 Feb 2013 23:52:58 +0000 (15:52 -0800)
committerRob Pike <r@golang.org>
Thu, 28 Feb 2013 23:52:58 +0000 (15:52 -0800)
Fixes #4942.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7444047

doc/articles/image_package.html

index 24601b57494929f412f02da08b1fcf334775848f..ebe92a1ca99a6acf27ca8430b90ad849620be803 100644 (file)
@@ -194,7 +194,7 @@ way to iterate over an <code>Image</code> m's pixels looks like:
 <pre>
 b := m.Bounds()
 for y := b.Min.Y; y &lt; b.Max.Y; y++ {
-       for x := b.Min.X; y &lt; b.Max.X; x++ {
+       for x := b.Min.X; x &lt; b.Max.X; x++ {
                doStuffWith(m.At(x, y))
        }
 }