Merge pull request #113 from errose28/fix-json

Fix json output when bar has no items
This commit is contained in:
Felix Kratz 2021-11-14 21:17:40 +01:00 committed by GitHub
commit a86733a237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -452,6 +452,6 @@ void bar_manager_serialize(struct bar_manager* bar_manager, FILE* rsp) {
for (int i = 0; i < bar_manager->bar_item_count; i++) {
fprintf(rsp, "\t\t \"%s\"", bar_manager->bar_items[i]->name);
if (i < bar_manager->bar_item_count - 1) fprintf(rsp, ",\n");
else fprintf(rsp, "\n\t]\n}\n");
}
fprintf(rsp, "\n\t]\n}\n");
}