aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorCarl Smedstad <carl.smedstad@protonmail.com>2022-12-30 10:35:25 +0100
committerSimon Ser <contact@emersion.fr>2023-01-03 21:50:56 +0100
commit714559812e222f988e18a52ffecd8dcaf9604ad5 (patch)
tree94a4d33cc681fe11942256c851ff0eeca21d98a7 /swaybar
parent9425ce2fba6dd643c240386901de370ac90cc337 (diff)
Use correct length for strncmp comparison
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 95f6e5be..ccf36563 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -292,7 +292,7 @@ static uint32_t render_status_block(struct render_context *ctx,
}
double offset = 0;
- if (strncmp(block->align, "left", 5) == 0) {
+ if (strncmp(block->align, "left", 4) == 0) {
offset = x_pos;
} else if (strncmp(block->align, "right", 5) == 0) {
offset = x_pos + width - text_width;