From 714559812e222f988e18a52ffecd8dcaf9604ad5 Mon Sep 17 00:00:00 2001 From: Carl Smedstad Date: Fri, 30 Dec 2022 10:35:25 +0100 Subject: Use correct length for strncmp comparison --- swaybar/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swaybar') 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; -- cgit v1.2.3