Skip to content

pkg/imgdiff: upper image bounds should be exclusive #12

Open
@jba

Description

@jba

The max point of a bounding rectangle for an image.Image is exclusive.
So the current loops

			for y := i; y <= image1.Bounds().Max.Y; y += cpus {
				for x := 0; x <= image1.Bounds().Max.X; x++ {

actually go one past the end.
Replace both <= with <.
Luckily Image.At doesn't panic in this case, but the code is still technically wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions