From 6afe3cc8ec6c009a43950bdbe138cbc2d7a88a4d Mon Sep 17 00:00:00 2001 From: = Date: Thu, 5 May 2022 15:23:47 +0200 Subject: Quality of life changes --- storage.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'storage.c') diff --git a/storage.c b/storage.c index 5e7809b..2a5420b 100644 --- a/storage.c +++ b/storage.c @@ -6,6 +6,7 @@ row *newRow(const char path[MAXPATH]){ memcpy(nr->path, path, MAXPATH); memcpy(nr->tags, "\0", MAXTAGS); nr->numTags = 0; + nr->lenTags = 0; return nr; } @@ -113,6 +114,7 @@ void insertTag(row *r, char *tag){ } r->tags[tagnum] = '\0'; r->numTags = l; + r->lenTags = tagnum; } // Remove a tag from the tags array in the row r @@ -153,4 +155,5 @@ void removeTag(row *r, char *tag){ } r->tags[tagnum] = '\0'; r->numTags = l; -} \ No newline at end of file + r->lenTags = tagnum; +} -- cgit v1.2.3