[FarGroup/FarManager] master: Fix assertion (05104bb81)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Nov 8, 2025, 2:30:58 PM (8 days ago) Nov 8
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/05104bb8157f33a87446ad82b61e276e59f58730

>---------------------------------------------------------------

commit 05104bb8157f33a87446ad82b61e276e59f58730
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Sat Nov 8 19:28:20 2025 +0000

Fix assertion


>---------------------------------------------------------------

05104bb8157f33a87446ad82b61e276e59f58730
far/common/2d/rectangle.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/far/common/2d/rectangle.hpp b/far/common/2d/rectangle.hpp
index 2cd3fdf11..929555b2c 100644
--- a/far/common/2d/rectangle.hpp
+++ b/far/common/2d/rectangle.hpp
@@ -84,10 +84,10 @@ struct rectangle_t
bool operator==(rectangle_t const&) const = default;

[[nodiscard]]
- auto width() const noexcept { assert(left <= right); return right - left + 1; }
+ auto width() const noexcept { assert(right - left + 1 >= 0); return right - left + 1; }

[[nodiscard]]
- auto height() const noexcept { assert(top <= bottom); return bottom - top + 1; }
+ auto height() const noexcept { assert(bottom - top + 1 >= 0); return bottom - top + 1; }

[[nodiscard]]
bool contains(point const& Point) const noexcept


Reply all
Reply to author
Forward
0 new messages