From: eap Date: Thu, 3 Aug 2006 05:59:03 +0000 (+0000) Subject: PLEIADES. fix WrapperIndex(index) for negative index X-Git-Tag: For_OCT_611~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=686d2fa85dbcf29f06d8d7349caf6db83df10b80;p=modules%2Fsmesh.git PLEIADES. fix WrapperIndex(index) for negative index --- 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; }