Fix short extensions handling.

This commit is contained in:
sorgelig
2018-08-30 00:16:32 +08:00
parent 43cbd37976
commit a3c67d2605
2 changed files with 28 additions and 9 deletions

View File

@@ -206,6 +206,7 @@ char* GetExt(char *ext)
while (*ext) {
strcpy(p, ",");
strncat(p, ext, 3);
while (*(p + strlen(p) - 1) == ' ') *(p + strlen(p) - 1) = 0;
if (strlen(ext) <= 3) break;
ext += 3;
p += strlen(p);