summaryrefslogtreecommitdiff
path: root/source/sys_unix.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-08-22 17:23:57 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-08-22 17:23:57 +0000
commit1bef88894b7d80308460f480fb84958f65922e02 (patch)
treec7d6cd2b9a0bad7405ca75b79eda9df2d6471bac /source/sys_unix.c
parente6f9f100490b454a271f69f4af58eafbde92a87d (diff)
FS_ExtCmp now correctly handles complex extensions, e.g. '.dm2.gz'.
Fixed NULL pointer dereference when CL_Disconnect is called before client finishes initialization.
Diffstat (limited to 'source/sys_unix.c')
-rw-r--r--source/sys_unix.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/sys_unix.c b/source/sys_unix.c
index 8596ef7..b7e88d0 100644
--- a/source/sys_unix.c
+++ b/source/sys_unix.c
@@ -1012,11 +1012,8 @@ char **Sys_ListFiles( const char *path, const char *extension,
}
}
- if( extension ) {
- s = COM_FileExtension( findInfo->d_name );
- if( !FS_ExtCmp( extension, s ) ) {
- continue;
- }
+ if( extension && !FS_ExtCmp( extension, findInfo->d_name ) ) {
+ continue;
}
if( flags & FS_SEARCH_SAVEPATH ) {