From 0175ffd21fe9347f664ed34477757da9f142d5fb Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Tue, 20 Sep 2022 22:03:40 +0100 Subject: [PATCH] Shorten more redundant programmer description for -c \? -p part --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 83abbaa8..b418fa80 100644 --- a/src/main.c +++ b/src/main.c @@ -196,7 +196,7 @@ static void pmshorten(char *desc, const char *modes) { for(size_t i=0; i elen && strcmp(desc+len-elen, pairs[i].end) == 0 && strcmp(modes, pairs[i].mode) == 0) { + if(len > elen && strcasecmp(desc+len-elen, pairs[i].end) == 0 && strcmp(modes, pairs[i].mode) == 0) { desc[len-elen] = 0; break; }