]> git.ipfire.org Git - pakfire.git/commitdiff
progressbar: Fix output
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 20:14:34 +0000 (20:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 20:14:34 +0000 (20:14 +0000)
This was broken in 23b9395887ec464084ca57c23fbe8c012f467700.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/progressbar.c

index fcb184203c89a8df47c7f8f135048bf311a945a4..273c7a2c8f6f099e045725e54a611e98aa112689 100644 (file)
@@ -346,6 +346,9 @@ static int pakfire_progressbar_redraw(struct pakfire_progressbar* p) {
        for (i = 0; i < p->num_widgets; i++)
                elements[i] = NULL;
 
+       // Reset i
+       i = 0;
+
        // Process all non-expandable widgets in the first pass
        STAILQ_FOREACH(widget, &p->widgets, nodes) {
                const char* element = NULL;