Skip to content

Commit

Permalink
Fix engine error crash caused by language detection hooks (#699)
Browse files Browse the repository at this point in the history
Previous logic would always return `true`
  • Loading branch information
wolf109909 authored May 21, 2024
1 parent ab65355 commit 220b7a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion primedev/client/languagehooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ std::vector<std::string> file_list(fs::path dir, std::regex ext_pattern)
std::string GetAnyInstalledAudioLanguage()
{
for (const auto& lang : file_list("r2\\sound\\", std::regex(".*?general_([a-z]+)_patch_1\\.mstr")))
if (lang != "general" || lang != "")
if (lang != "general" && lang != "" && lang != "stream")
return lang;
return "NO LANGUAGE DETECTED";
}
Expand Down

0 comments on commit 220b7a1

Please sign in to comment.