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; }