summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bookmarks.c b/src/bookmarks.c
index 5815f447..7560a24c 100644
--- a/src/bookmarks.c
+++ b/src/bookmarks.c
@@ -65,8 +65,10 @@ void addTag_Bookmark(iBookmark *d, const char *tag) {
65 65
66void removeTag_Bookmark(iBookmark *d, const char *tag) { 66void removeTag_Bookmark(iBookmark *d, const char *tag) {
67 const size_t pos = indexOfCStr_String(&d->tags, tag); 67 const size_t pos = indexOfCStr_String(&d->tags, tag);
68 remove_Block(&d->tags.chars, pos, strlen(tag)); 68 if (pos != iInvalidPos) {
69 trim_String(&d->tags); 69 remove_Block(&d->tags.chars, pos, strlen(tag));
70 trim_String(&d->tags);
71 }
70} 72}
71 73
72iDefineTypeConstruction(Bookmark) 74iDefineTypeConstruction(Bookmark)