From: Michael Stapelberg Date: Thu, 12 Jul 2012 06:16:40 +0000 (+0200) Subject: Bugfix: Properly skip "consumption", not "consumptionbuf" (Thanks mloskot) X-Git-Tag: 2.6~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dea8703abaf8deb94a1212dde25b211ad8411846;p=i3%2Fi3status Bugfix: Properly skip "consumption", not "consumptionbuf" (Thanks mloskot) Fixes #752 --- diff --git a/src/print_battery_info.c b/src/print_battery_info.c index 3c33d3e..b992efb 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -264,7 +264,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char walk += strlen("emptytime"); } else if (strncmp(walk+1, "consumption", strlen("consumption")) == 0) { outwalk += sprintf(outwalk, "%s", consumptionbuf); - walk += strlen("consumptionbuf"); + walk += strlen("consumption"); } }