aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge/general.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/cge/general.cpp b/engines/cge/general.cpp
index f17ebf799c..4ca1ef57ca 100644
--- a/engines/cge/general.cpp
+++ b/engines/cge/general.cpp
@@ -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;
}