From: Thomas Debesse Date: Tue, 11 Jul 2017 11:17:43 +0000 (+0200) Subject: fix pk3 archive loading X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=17ead681d93865200176a996738bba5ad17e44b1 fix pk3 archive loading pk3dir/dpkdir directories were working, not pk3/dpk archives because of wrong extension comparison. --- diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index e92bad76..a76fafba 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -660,7 +660,7 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ for ( Archives::iterator i = archives.begin(); i != archives.end(); ++i ) { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "dpk" ) ) { + if ( !string_compare_nocase_upper( ext, ".dpk" ) ) { CopiedString name_final = CopiedString( StringRange( name, ext ) ); fullpath = string_new_concat( path, name ); AddDpkPak( name_final.c_str(), fullpath, true ); @@ -673,8 +673,8 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "pk3" ) - || !string_compare_nocase_upper( ext, "pk4" ) ) { + if ( !string_compare_nocase_upper( ext, ".pk3" ) + || !string_compare_nocase_upper( ext, ".pk4" ) ) { fullpath = string_new_concat( path, i->c_str() ); InitPakFile( archiveModules, fullpath ); string_release( fullpath, string_length( fullpath ) ); @@ -684,8 +684,8 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "pk3" ) - || !string_compare_nocase_upper( ext, "pk4" ) ) { + if ( !string_compare_nocase_upper( ext, ".pk3" ) + || !string_compare_nocase_upper( ext, ".pk4" ) ) { fullpath = string_new_concat( path, i->c_str() ); InitPakFile( archiveModules, fullpath ); string_release( fullpath, string_length( fullpath ) );