From 61bd4079a0e2cb3817892580461407c8d009338d Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 23 Jan 2021 16:15:39 -0500 Subject: Preserve order of filters when removing Filters should be kept in order since the first one that matches, wins. This lets highlights or ignores take priority over each other, if desired. --- filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filter.c') diff --git a/filter.c b/filter.c index 2a7d564..a648d8b 100644 --- a/filter.c +++ b/filter.c @@ -74,7 +74,7 @@ bool filterRemove(struct Filter filter) { if (filter.chan && strcasecmp(filters[i].chan, filter.chan)) continue; if (filter.mesg && strcasecmp(filters[i].mesg, filter.mesg)) continue; free(filters[i].mask); - filters[i] = filters[--len]; + memmove(&filters[i], &filters[i + 1], sizeof(*filters) * --len); filters[len] = (struct Filter) {0}; found = true; } -- cgit 1.4.0 able class='tabs'> summary refs log tree commit diff
path: root/bin/Makefile (unfollow)
Commit message (Expand)Author
2019-09-12Only GET the final redirect locationJune McEnroe
2019-09-12Consume entire bodyJune McEnroe
2019-09-10Add title -v flagJune McEnroe
2019-09-10Use curl error bufferJune McEnroe
2019-09-10Set Accept-Encoding in titleJune McEnroe
2019-09-08Set title User-AgentJune McEnroe
2019-09-07Add -x flag to titleJune McEnroe
2019-09-07Ignore SIGPIPE in relayJune McEnroe
2019-09-07Add A Memory Called EmpireJune McEnroe
2019-09-05Handle lack of Content-TypeJune McEnroe
2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe
2019-09-05Decode entities in titlesJune McEnroe
2019-09-05Print title as soon as it's availableJune McEnroe
2019-09-05Use CURL_PREFIX to set flagsJune McEnroe
2019-09-05Add titleJune McEnroe
2019-09-04Add Avorter n'est pas tuerJune McEnroe
2019-08-29Unset executable on shell scriptsJune McEnroe
2019-08-29Add long-missing setopt to bin.7June McEnroe
2019-08-29Add editJune McEnroe