From 5a444332916ec15a2fb3fa9c14ca9c0dc628eaa9 Mon Sep 17 00:00:00 2001 From: przemekmirek Date: Thu, 8 Nov 2018 20:47:58 +0100 Subject: [PATCH] Fix relationship sorting --- source/workbook/workbook.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/workbook/workbook.cpp b/source/workbook/workbook.cpp index fcea0b12..dae61446 100644 --- a/source/workbook/workbook.cpp +++ b/source/workbook/workbook.cpp @@ -1617,9 +1617,9 @@ struct rel_id_sorter bool operator()(const xlnt::relationship &lhs, const xlnt::relationship &rhs) { // format is rTd - 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(); }