From: black Date: Thu, 14 Feb 2008 20:41:07 +0000 (+0000) Subject: Fix something Ive broken ofc. X-Git-Tag: xonotic-v0.1.0preview~2423 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=42b9e71a69aced057143f7520a1a8631f24d20f3;p=xonotic%2Fdarkplaces.git Fix something Ive broken ofc. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8093 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/fs.c b/fs.c index ad6e55b5..648b7860 100644 --- a/fs.c +++ b/fs.c @@ -2596,6 +2596,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet) } else { + int searchpathlen = strlen( searchpath->filename ); // get a directory listing and look at each name dpsnprintf(netpath, sizeof (netpath), "%s%s", searchpath->filename, basepath); stringlistinit(&dirlist); @@ -2603,7 +2604,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet) for (dirlistindex = 0;dirlistindex < dirlist.numstrings;dirlistindex++) { const char *direntry = dirlist.strings[dirlistindex]; - if (matchpattern(direntry, (char *)pattern, true)) + if (matchpattern(direntry + searchpathlen, (char *)pattern, true)) { for (resultlistindex = 0;resultlistindex < resultlist.numstrings;resultlistindex++) if (!strcmp(resultlist.strings[resultlistindex], direntry))