From 220b7a1bf7915a336b9c2a08806e60c1c32bde8e Mon Sep 17 00:00:00 2001 From: wolf109909 <84360921+wolf109909@users.noreply.github.com> Date: Tue, 21 May 2024 21:50:22 +0800 Subject: Fix engine error crash caused by language detection hooks (#699) Previous logic would always return `true` --- primedev/client/languagehooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'primedev') diff --git a/primedev/client/languagehooks.cpp b/primedev/client/languagehooks.cpp index 35ca5659..0146d1d4 100644 --- a/primedev/client/languagehooks.cpp +++ b/primedev/client/languagehooks.cpp @@ -41,7 +41,7 @@ std::vector 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"; } -- cgit v1.2.3