foxygit / doom Log in
commit 1bbbdea98a3dcfea7ebe592329cfe79c06515935
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Oct 27 18:29:25 2018 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Oct 27 18:29:25 2018 -0400

    glob: Fix quirk with patterns ending in '*'.

    If a glob pattern ends in a '*' then we will expect to find an empty
    string at the end of our attempted matches.
---
 src/i_glob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i_glob.c b/src/i_glob.c
index 547650ee..d47a60b5 100644
--- a/src/i_glob.c
+++ b/src/i_glob.c
@@ -98,7 +98,7 @@ static boolean MatchesGlob(const char *name, const char *glob)
                 }
                 ++name;
             }
-            return false;
+            return glob[1] == '\0';
         }
         else if (*glob != '?' && *name != *glob)
         {