aboutsummaryrefslogtreecommitdiff
path: root/swaybar/ipc.c
diff options
context:
space:
mode:
authorPaul Riou <paul@mirliton.io>2025-03-20 20:01:36 +0000
committerSimon Ser <contact@emersion.fr>2025-03-20 21:31:32 +0100
commit4b185a0fe0031455d5ceab1eda2b9d9ffe0c81de (patch)
tree7da8f26ceeced65f548de0a8ba2489d62e8cae71 /swaybar/ipc.c
parentd148560f50ce81bd5ca0e0f0d52c65c21f8b751d (diff)
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"
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r--swaybar/ipc.c2
1 files changed, 1 insertions, 1 deletions
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);