commit 663b34e4e032efe783cebcba6e0802a7e23356bb
parent 0075b07aac2d544845d5d18ba65773270fc3c279
Author: Rio6 <rio.liu@r26.me>
Date: Sun, 24 Jan 2021 14:24:25 -0500
Don't draw height that's <0
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/unlock_indicator.c b/unlock_indicator.c
@@ -367,7 +367,9 @@ static void draw_bar(cairo_t *ctx, double bar_offset, double screen_x, double sc
for (int i = 0; i < bar_count; ++i) {
double bar_height = bar_heights[i];
- draw_single_bar(ctx, screen_pos + i * bar_width, bar_offset, bar_width, bar_height);
+ if (bar_height > 0) {
+ draw_single_bar(ctx, screen_pos + i * bar_width, bar_offset, bar_width, bar_height);
+ }
}
for (int i = 0; i < bar_count; ++i) {