From f778317bae709f397345a2d5e04e23864c6391b3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 7 Jun 2022 14:49:51 +0200 Subject: fix: index cursor x position from 0 --- src/engine/data/bounds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/engine/data/bounds.cpp') diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp index ca67008..0cbe9c3 100644 --- a/src/engine/data/bounds.cpp +++ b/src/engine/data/bounds.cpp @@ -32,7 +32,7 @@ auto Bounds::validate_coords(const Vector2 &coords) const noexcept -> CoordsVali return CoordsValidation::X_HIGH; } - if (static_cast(coords.get_x()) <= 0) + if (static_cast(coords.get_x()) < 0) { return CoordsValidation::X_LOW; } @@ -42,7 +42,7 @@ auto Bounds::validate_coords(const Vector2 &coords) const noexcept -> CoordsVali return CoordsValidation::Y_HIGH; } - if (static_cast(coords.get_y()) <= 0) + if (static_cast(coords.get_y()) < 0) { return CoordsValidation::Y_LOW; } -- cgit v1.2.3-18-g5258