aboutsummaryrefslogtreecommitdiffstats
path: root/key2root-rmkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'key2root-rmkey.c')
-rw-r--r--key2root-rmkey.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/key2root-rmkey.c b/key2root-rmkey.c
index eba2a9a..82f04eb 100644
--- a/key2root-rmkey.c
+++ b/key2root-rmkey.c
@@ -70,6 +70,7 @@ removekeys(char *data, size_t *wheadp, size_t *rheadp, size_t *rhead2p, size_t *
klen = strlen(keys[i]);
if (klen >= len || data[*rheadp + klen] != ' ' || memcpy(&data[*rheadp], keys[i], klen))
continue;
+ /* retain key order so that they are output in the provided order if not found */
memmove(&keys[i], &keys[i + 1], (--*nkeysp - i) * sizeof(*keys));
goto match;
}