From c82ec07c97791708311d509ab7e3d2f514de04d0 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 25 Sep 2017 22:07:12 +0200
Subject: [PATCH] use max() in setMaxTag, so that it only ever increases the
 value

TODO: change the name of the function (e.g. updateMaxTag)
---
 Geo/GModelIO_OCC.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp
index 23ac5442e5..493c9ab026 100644
--- a/Geo/GModelIO_OCC.cpp
+++ b/Geo/GModelIO_OCC.cpp
@@ -121,7 +121,7 @@ void OCC_Internals::reset()
 void OCC_Internals::setMaxTag(int dim, int val)
 {
   if(dim < -2 || dim > 3) return;
-  _maxTag[dim + 2] = val;
+  _maxTag[dim + 2] = std::max(_maxTag[dim + 2], val);
 }
 
 int OCC_Internals::getMaxTag(int dim) const
-- 
GitLab