commit 28c6c516062451900f9efc1cfb758eaab1165bc2
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Feb 10 03:19:30 2007 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sat Feb 10 03:19:30 2007 +0000
Don't prepend a superfluous './' to the path when searching the current
directory for an IWAD.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 833
---
src/d_iwad.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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))
{