Просмотр исходного кода

SDL_GlobDirectory(): Don't descend into sub-directories, if not requested by pattern

Petar Popovic 3 дней назад
Родитель
Сommit
d6129d063f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/filesystem/SDL_filesystem.c

+ 1 - 1
src/filesystem/SDL_filesystem.c

@@ -203,7 +203,7 @@ static bool WildcardMatch(const char *pattern, const char *str, bool *matched_to
         pch = *(++pattern);
     }
 
-    *matched_to_dir = ((pch == '/') || (pch == '\0'));  // end of string and the pattern is complete or failed at a '/'? We should descend into this directory.
+    *matched_to_dir = (pch == '/');  // end of string and the pattern failed at a '/'? We should descend into this directory.
 
     return (pch == '\0');  // survived the whole pattern? That's a match!
 }