diff options
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/sys_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c index b72c91d7..26fb2b29 100644 --- a/src/sys/sys_unix.c +++ b/src/sys/sys_unix.c @@ -398,9 +398,9 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter continue; if (*extension) { - if ( strlen( d->d_name ) < strlen( extension ) || + if ( strlen( d->d_name ) < extLen || Q_stricmp( - d->d_name + strlen( d->d_name ) - strlen( extension ), + d->d_name + strlen( d->d_name ) - extLen, extension ) ) { continue; // didn't match } |