From 2805f3426d099d0f66f12fef74314ef835768584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 25 Feb 2019 16:53:31 +0000 Subject: [PATCH] rhbz#1678319 workaround miscompilation Change-Id: Iba37c4e9c623ab5f40547b1e491c2d92f741bda0 --- sc/source/filter/xml/xmlcoli.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index a9033196ecbc..12e91f26f60e 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -53,8 +53,11 @@ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport, { case XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ): { - nColCount = std::max(aIter.toInt32(), 1); - nColCount = std::min(nColCount, MAXCOLCOUNT); + nColCount = aIter.toInt32(); + if (nColCount < 1) + nColCount = 1; + else if (nColCount > MAXCOLCOUNT) + nColCount = MAXCOLCOUNT; } break; case XML_ELEMENT( TABLE, XML_STYLE_NAME ): -- 2.21.0.rc1