From 21b3eba5306aa277cf169fcbf56fc14ef84a2974 Mon Sep 17 00:00:00 2001 From: BotoX Date: Fri, 25 Dec 2020 19:15:33 +0100 Subject: [PATCH] Fix rare file loading bug which on case-sensitive filesystems (Linux) --- src/filesystem/basefilesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/basefilesystem.cpp b/src/filesystem/basefilesystem.cpp index b699836..fe0518c 100644 --- a/src/filesystem/basefilesystem.cpp +++ b/src/filesystem/basefilesystem.cpp @@ -4321,7 +4321,7 @@ bool CBaseFileSystem::FixUpPath( const char *pFileName, char *pFixedUpFileName, { // If the first part of the pFixedUpFilename is pBaseDir // then lowercase the part after that. - if ( *pBaseDir && (iBaseLength+1 < V_strlen( pFixedUpFileName ) ) && (0 != V_strncmp( pBaseDir, pFixedUpFileName, iBaseLength ) ) ) + if ( *pBaseDir && (iBaseLength+1 < V_strlen( pFixedUpFileName ) ) && (0 == V_strncmp( pBaseDir, pFixedUpFileName, iBaseLength ) ) ) { V_strlower( &pFixedUpFileName[iBaseLength-1] ); }