From 06214c544a237076c4fb4c8312841f78253ab00d Mon Sep 17 00:00:00 2001 From: Joel Linn Date: Thu, 5 Nov 2020 11:52:48 +0100 Subject: [PATCH] [CPU] std::sort compare: satisfy comp(a,a)==false --- src/xenia/cpu/export_resolver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/export_resolver.cc b/src/xenia/cpu/export_resolver.cc index ecc5d8246..b05df5d83 100644 --- a/src/xenia/cpu/export_resolver.cc +++ b/src/xenia/cpu/export_resolver.cc @@ -30,7 +30,7 @@ ExportResolver::Table::Table(const std::string_view module_name, } std::sort( exports_by_name_.begin(), exports_by_name_.end(), - [](Export* a, Export* b) { return std::strcmp(a->name, b->name) <= 0; }); + [](Export* a, Export* b) { return std::strcmp(a->name, b->name) < 0; }); } ExportResolver::ExportResolver() = default; @@ -51,7 +51,7 @@ void ExportResolver::RegisterTable( } std::sort( all_exports_by_name_.begin(), all_exports_by_name_.end(), - [](Export* a, Export* b) { return std::strcmp(a->name, b->name) <= 0; }); + [](Export* a, Export* b) { return std::strcmp(a->name, b->name) < 0; }); } Export* ExportResolver::GetExportByOrdinal(const std::string_view module_name,