From fc1c17932efd8cb7555d89369abbd2c83458b504 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 24 Apr 2021 14:25:27 +0200 Subject: [PATCH] fixed battery key index on multi battery systems --- src/modules/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery.c b/src/modules/battery.c index 1b03f71f2..5451b9539 100644 --- a/src/modules/battery.c +++ b/src/modules/battery.c @@ -144,7 +144,7 @@ void ffPrintBattery(FFinstance* instance) { FFstrbuf* name = ffListGet(&dirs, i); ffStrbufAppend(&baseDir, name); - printBattery(instance, &baseDir, dirs.length == 1 ? 0 : i); + printBattery(instance, &baseDir, dirs.length == 1 ? 0 : i + 1); ffStrbufSubstrBefore(&baseDir, baseDirLength); ffStrbufDestroy(name); }