summaryrefslogtreecommitdiff
path: root/src/d_iwad.c
diff options
context:
space:
mode:
authorSimon Howard2007-02-10 03:19:30 +0000
committerSimon Howard2007-02-10 03:19:30 +0000
commit28c6c516062451900f9efc1cfb758eaab1165bc2 (patch)
tree213fd889f402e4d5f3bcfa7d31f64d8ba0726ddb /src/d_iwad.c
parenta653fb6e0cfab8b5bbe71ae7652e1a9af810b065 (diff)
downloadchocolate-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.c9
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))
{