From 6f7b1ae1e9aa5d16b4cbbf0d7eb9f770c81e9b2f Mon Sep 17 00:00:00 2001 From: Capybara121 <97924274+Capybara121@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:30:03 +1200 Subject: [PATCH] Fixed off-by-1 error (#592) --- src/bar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bar.c b/src/bar.c index 7d43b07..3816e13 100644 --- a/src/bar.c +++ b/src/bar.c @@ -244,10 +244,10 @@ static void bar_calculate_bounds_top_bottom(struct bar* bar) { - center_length) / 2 - 1; uint32_t bar_center_right_first_item_x = (bar->window.frame.size.width - + notch_width) / 2 - 1; + + notch_width) / 2; uint32_t bar_center_left_first_item_x = (bar->window.frame.size.width - - notch_width) / 2 - 1; + - notch_width) / 2; uint32_t* next_position = NULL; uint32_t y = bar->window.frame.size.height / 2; @@ -364,10 +364,10 @@ static void bar_calculate_bounds_left_right(struct bar* bar) { - center_length) / 2 - 1; uint32_t bar_center_right_first_item_y = (bar->window.frame.size.height - + notch_width) / 2 - 1; + + notch_width) / 2; uint32_t bar_center_left_first_item_y = (bar->window.frame.size.height - - notch_width) / 2 - 1; + - notch_width) / 2 ; uint32_t* next_position = NULL;