summaryrefslogtreecommitdiff
path: root/clients/bokftui.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/bokftui.c')
-rw-r--r--clients/bokftui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/bokftui.c b/clients/bokftui.c
index a8b582c..4ce5a62 100644
--- a/clients/bokftui.c
+++ b/clients/bokftui.c
@@ -3565,6 +3565,8 @@ static void ib_screen(struct app *a)
mvaddstr(4, 62, "Belopp");
attroff(A_BOLD);
int64_t sum = 0;
+ for (int i = 0; i < n; i++)
+ sum += amts[i];
if (n == 0) {
mvaddstr(6, 2, "Ingen ingående balans registrerad ännu.");
}
@@ -3577,7 +3579,6 @@ static void ib_screen(struct app *a)
snprintf(nbuf, sizeof nbuf, "%s", nm ? nm : "");
pad_field(nbuf, sizeof nbuf, 50);
mvprintw(6 + i, 2, "%-6s %s %14s", accs[idx], nbuf, amount);
- sum += amts[idx];
}
char sumbuf[32];
kr_format(sum, sumbuf, sizeof sumbuf);