]> git.sur5r.net Git - i3/i3status/commitdiff
Bugfix: Properly skip "consumption", not "consumptionbuf" (Thanks mloskot)
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 12 Jul 2012 06:16:40 +0000 (08:16 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 12 Jul 2012 06:16:40 +0000 (08:16 +0200)
Fixes #752

src/print_battery_info.c

index 3c33d3e55e92034eb9124cd6f13848aed9633294..b992efb84f3b883775fcf148a038aa4ccf19ddec 100644 (file)
@@ -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");
                 }
         }