commit abf30897f6c0751e33b19b456b1e3e0c20bf5c28
parent abed34cf0246d7e1f5c84b06fcea85679227f46b
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sun, 19 Nov 2023 02:51:09 +0530
Fix WHO nodes getting added in the root of the tree
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/book.c b/book.c
@@ -183,7 +183,7 @@ int account_add(map_tree_t **rootp, char *acc, size_t acc_size)
printf("Present already= %d %.*s\n", j, j, acc);
}
if (i + 1 != acc_size) {
- return account_add(&(*rootp)->children, acc + j,
+ return account_add(&(current_node->children), acc + j,
acc_size - j);
}
}
@@ -245,8 +245,7 @@ void ledger_parse_data(char *text, size_t text_len)
switch (state) {
case ENTRY_WHO:
case ENTRY_END:
- // push the entries to stack or somethin
- printf("case ENTRY_END: '%c', prev: '%c'\n", c, text[i-1]);
+ // TODO push the entries to stack or somethin
if (text[i - 1] == '\n') {
printf("----- Entry End Marked -----\n");
state = DATE;