Merge pull request #363 from pmir/fix-relationship-ordering

Fix relationship sorting
This commit is contained in:
Thomas Fussell 2019-06-21 17:49:20 -04:00 committed by GitHub
commit 938d99ddc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1617,9 +1617,9 @@ struct rel_id_sorter
bool operator()(const xlnt::relationship &lhs, const xlnt::relationship &rhs)
{
// format is rTd<decimal number 1..n>
if (lhs.id().size() < rhs.id().size()) // a number with more digits will be larger
if (lhs.id().size() != rhs.id().size()) // a number with more digits will be larger
{
return true;
return lhs.id().size() < rhs.id().size();
}
return lhs.id() < rhs.id();
}