Skip to content

Commit 83221f7

Browse files
committed
debugui: wrong condition for a low/high value pair
1 parent 5a1b47e commit 83221f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (c *Context) SliderF(value *float64, low, high float64, step float64, digit
5050
}
5151

5252
func (c *Context) slider(value *int, low, high, step int, id widgetID, opt option) (EventHandler, error) {
53-
if low > high {
53+
if low >= high {
5454
return nil, fmt.Errorf("debugui: slider low (%d) must be less than or equal to high (%d)", low, high)
5555
}
5656

@@ -93,7 +93,7 @@ func (c *Context) slider(value *int, low, high, step int, id widgetID, opt optio
9393
}
9494

9595
func (c *Context) sliderF(value *float64, low, high, step float64, digits int, id widgetID, opt option) (EventHandler, error) {
96-
if low > high {
96+
if low >= high {
9797
return nil, fmt.Errorf("debugui: slider low (%f) must be less than or equal to high (%f)", low, high)
9898
}
9999

0 commit comments

Comments
 (0)