commit 5e94550dcf80be52bea759c72bb28194beebd89b parent 02ff0063e824b8cda96b70ab876fcdc8823786d7 Author: JohnMcPMS <johnmcp@microsoft.com> Date: Tue, 18 Oct 2022 16:20:13 -0700 Treat little numbers as big numbers (#2606) Diffstat:
| M | src/AppInstallerRepositoryCore/ARPCorrelationAlgorithms.cpp | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/AppInstallerRepositoryCore/ARPCorrelationAlgorithms.cpp b/src/AppInstallerRepositoryCore/ARPCorrelationAlgorithms.cpp @@ -95,7 +95,7 @@ namespace AppInstaller::Repository::Correlation // We use that to scale to [0,1]. // A smaller distance represents a higher match, so we subtract from 1 for the final score double editDistance = distance.At(s1.size() - 1, s2.size() - 1); - return 1 - editDistance / (s1.size() + s2.size()); + return 1 - editDistance / (static_cast<uint64_t>(s1.size()) + static_cast<uint64_t>(s2.size())); } }