Skip to content

Commit

Permalink
Merge pull request lxn#388 from adongy/patch-1
Browse files Browse the repository at this point in the history
Fix grid layout rectangle bounds check
  • Loading branch information
lxn authored May 21, 2018
2 parents 15b65b9 + 48714b7 commit 02935ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gridlayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ func (l *GridLayout) SetRange(widget Widget, r Rectangle) error {
if r.X < 0 || r.Y < 0 {
return newError("range.X and range.Y must be >= 0")
}
if r.Width < 0 || r.Height < 0 {
return newError("range.Width and range.Height must be > 1")
if r.Width < 1 || r.Height < 1 {
return newError("range.Width and range.Height must be >= 1")
}

info := l.widget2Info[widget]
Expand Down

0 comments on commit 02935ba

Please sign in to comment.