winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 3ffb45c2c97c6bdb96ee5fb8a98eb7417fb9f71e
parent 810a441915a4ee0416120699e0b3f7dc1788e0bd
Author: JohnMcPMS <johnmcp@microsoft.com>
Date:   Thu, 23 Sep 2021 12:06:28 -0700

Exit the loc choice loop if the default localization is good enough (#1500)


Diffstat:
Msrc/AppInstallerCommonCore/Manifest/Manifest.cpp | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/AppInstallerCommonCore/Manifest/Manifest.cpp b/src/AppInstallerCommonCore/Manifest/Manifest.cpp @@ -38,9 +38,12 @@ namespace AppInstaller::Manifest } // If there's better locale than default And is compatible with target locale, merge and return; - if (bestLocalization != nullptr && bestScore >= Locale::MinimumDistanceScoreAsCompatibleMatch) + if (bestScore >= Locale::MinimumDistanceScoreAsCompatibleMatch) { - CurrentLocalization.ReplaceOrMergeWith(*bestLocalization); + if (bestLocalization != nullptr) + { + CurrentLocalization.ReplaceOrMergeWith(*bestLocalization); + } break; } }