aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-12 22:43:24 +1000
committerPaul Gilbert2011-07-12 22:43:24 +1000
commit700dbe021ed98939d52649c4961744f2172a1986 (patch)
tree2463071374a07dfcd575e705cc6ea6c4236981bd /engines
parent11c9e64885faed3c3d7ba5888e3f129548f789e8 (diff)
downloadscummvm-rg350-700dbe021ed98939d52649c4961744f2172a1986.tar.gz
scummvm-rg350-700dbe021ed98939d52649c4961744f2172a1986.tar.bz2
scummvm-rg350-700dbe021ed98939d52649c4961744f2172a1986.zip
CGE: Fix ProgName method to handle extensions without a leading period
Diffstat (limited to 'engines')
-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;
}