From 4b185a0fe0031455d5ceab1eda2b9d9ffe0c81de Mon Sep 17 00:00:00 2001 From: Paul Riou Date: Thu, 20 Mar 2025 20:01:36 +0000 Subject: stringop: fix has_prefix() arg order in config parsing has_prefix() expects the prefix to be the 2nd argument, not the first. The config parsing was broken when using `--input-device=`. Introduced by: 0c60d1581f7b12ae472c786b7dfe27a1c6ec9a47 "Use has_prefix() instead of strncmp() throughout" --- swaybar/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swaybar') diff --git a/swaybar/ipc.c b/swaybar/ipc.c index f651f035..68d8dd32 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c @@ -46,7 +46,7 @@ void ipc_send_workspace_command(struct swaybar *bar, const char *ws) { char *parse_font(const char *font) { char *new_font = NULL; - if (has_prefix("pango:", font)) { + if (has_prefix(font, "pango:")) { font += strlen("pango:"); } new_font = strdup(font); -- cgit v1.2.3