diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks.c | 6 |
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 | ||
66 | void removeTag_Bookmark(iBookmark *d, const char *tag) { | 66 | void 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 | ||
72 | iDefineTypeConstruction(Bookmark) | 74 | iDefineTypeConstruction(Bookmark) |