diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index 6979dce9..ee026bd8 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -357,6 +357,14 @@ Sys_FOpen ============== */ FILE *Sys_FOpen( const char *ospath, const char *mode ) { + size_t length; + + // Windows API ignores all trailing spaces and periods which can get around Quake 3 file system restrictions. + length = strlen( ospath ); + if ( length == 0 || ospath[length-1] == ' ' || ospath[length-1] == '.' ) { + return NULL; + } + return fopen( ospath, mode ); }