From 06fcebc542a919ab3ab73fad67088ec454713aaa Mon Sep 17 00:00:00 2001 From: Konstantin Pospelov Date: Wed, 23 Oct 2019 00:28:59 +0300 Subject: [PATCH] swaybar: fix typo in the loop over pixmaps Fixes #4665. --- swaybar/tray/item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index 1a7672c9..06a8e5b0 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -435,7 +435,7 @@ static void reload_sni(struct swaybar_sni *sni, char *icon_theme, int min_error = INT_MAX; for (int i = 0; i < pixmaps->length; ++i) { struct swaybar_pixmap *p = pixmaps->items[i]; - int e = abs(target_size - pixmap->size); + int e = abs(target_size - p->size); if (e < min_error) { pixmap = p; min_error = e;