CGE: Fix ProgName method to handle extensions without a leading period

This commit is contained in:
Paul Gilbert 2011-07-12 22:43:24 +10:00
parent 11c9e64885
commit 700dbe021e

View File

@ -102,8 +102,12 @@ void _fqsort(void *base, uint16 nelem, uint16 width, int (*fcmp)(const void *, c
const char *progName(const char *ext) {
static char buf[MAXFILE];
strcpy(buf, "CGE");
if (ext)
if (ext) {
strcat(buf, ".");
if (*ext == '.')
++ext;
strcat(buf, ext);
}
return buf;
}