Bugfix: Properly skip "consumption", not "consumptionbuf" (Thanks mloskot)

Fixes #752
This commit is contained in:
Michael Stapelberg 2012-07-12 08:16:40 +02:00
parent 141f45e792
commit dea8703aba

View 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");
}
}