From 686d2fa85dbcf29f06d8d7349caf6db83df10b80 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 Aug 2006 05:59:03 +0000 Subject: [PATCH] PLEIADES. fix WrapperIndex(index) for negative index --- src/SMDS/SMDS_MeshElement.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMDS/SMDS_MeshElement.hxx b/src/SMDS/SMDS_MeshElement.hxx index 7fdd180bb..54f506772 100644 --- a/src/SMDS/SMDS_MeshElement.hxx +++ b/src/SMDS/SMDS_MeshElement.hxx @@ -103,7 +103,7 @@ public: * \retval int - valid node index */ int WrappedIndex(const int ind) const { - if ( ind < 0 ) return -( ind % NbNodes()); + if ( ind < 0 ) return NbNodes() + ind % NbNodes(); if ( ind >= NbNodes() ) return ind % NbNodes(); return ind; } -- 2.39.2