diff options
-rw-r--r-- | src/internal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal.c b/src/internal.c index 00867e8..ca84ed1 100644 --- a/src/internal.c +++ b/src/internal.c @@ -23,7 +23,8 @@ make_point(const PuglCoord x, const PuglCoord y) bool puglIsValidPosition(const int x, const int y) { - return x >= INT16_MIN && x < INT16_MAX && y >= INT16_MIN && y < INT16_MAX; + // INT16_MIN is a sentinel, INT16_MAX is impossible with non-zero size + return x > INT16_MIN && x < INT16_MAX && y > INT16_MIN && y < INT16_MAX; } bool |