mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
13 lines
201 B
Go
13 lines
201 B
Go
package main
|
|
|
|
type Rectangle struct {
|
|
x, y, width, height int
|
|
}
|
|
|
|
func (r *Rectangle) containsBad(x, y int) bool {
|
|
return r.x <= x &&
|
|
y <= y && // NOT OK
|
|
x <= r.x+r.width &&
|
|
y <= r.y+r.height
|
|
}
|