diff options
author | Simon Howard | 2007-02-10 03:19:30 +0000 |
---|---|---|
committer | Simon Howard | 2007-02-10 03:19:30 +0000 |
commit | 28c6c516062451900f9efc1cfb758eaab1165bc2 (patch) | |
tree | 213fd889f402e4d5f3bcfa7d31f64d8ba0726ddb /src/d_iwad.c | |
parent | a653fb6e0cfab8b5bbe71ae7652e1a9af810b065 (diff) | |
download | chocolate-doom-28c6c516062451900f9efc1cfb758eaab1165bc2.tar.gz chocolate-doom-28c6c516062451900f9efc1cfb758eaab1165bc2.tar.bz2 chocolate-doom-28c6c516062451900f9efc1cfb758eaab1165bc2.zip |
Don't prepend a superfluous './' to the path when searching the current
directory for an IWAD.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 833
Diffstat (limited to 'src/d_iwad.c')
-rw-r--r-- | src/d_iwad.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/d_iwad.c b/src/d_iwad.c index 1b3c29f1..25d62ea0 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -280,7 +280,14 @@ static char *SearchDirectoryForIWAD(char *dir) filename = malloc(strlen(dir) + strlen(iwadname) + 3); - sprintf(filename, "%s%c%s", dir, DIR_SEPARATOR, iwadname); + if (!strcmp(dir, ".")) + { + strcpy(filename, iwadname); + } + else + { + sprintf(filename, "%s%c%s", dir, DIR_SEPARATOR, iwadname); + } if (M_FileExists(filename)) { |