From 957f87ec57aefd2b7363174b3202b12f33b5abde Mon Sep 17 00:00:00 2001 From: volpol Date: Fri, 15 Nov 2019 22:48:52 +0100 Subject: [PATCH] * Append ID instead of prepending it So that LABEL sort order is perserved --- riffx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riffx.c b/riffx.c index 690c785..f0d7de4 100644 --- a/riffx.c +++ b/riffx.c @@ -242,7 +242,7 @@ static inline int dump(const char *prefix, size_t id, const void *b, size_t len) /* Construct file name from prefix and label or id: */ lab = cfg.use_label ? labl(b, len) : ""; - snprintf(of, sizeof of, "%s%06zu%s%s%s", prefix, id, *lab?"_":"", lab, SUFFIX); + snprintf(of, sizeof of, "%s%s%s%06zu%s", prefix, lab, *lab?"_":"", id, SUFFIX); if (cfg.verbose) LOG(": %8zu -> %s\n", len, of); /* Caveat: This will overwrite any existing file with the same name! */ -- 2.30.2