Skip to content

Commit

Permalink
Exit the loc choice loop if the default localization is good enough (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcPMS authored Sep 23, 2021
1 parent 810a441 commit 3ffb45c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/AppInstallerCommonCore/Manifest/Manifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 3ffb45c

Please sign in to comment.