From 88f664bd94b6b09ad4463e339966dabd2a5e43c5 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 23 Aug 2013 16:32:04 +0000 Subject: [PATCH] fix invalid memory access (n[2] is never allocated!) --- Geo/MTriangle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geo/MTriangle.cpp b/Geo/MTriangle.cpp index 3c73eb8de4..55ac74da67 100644 --- a/Geo/MTriangle.cpp +++ b/Geo/MTriangle.cpp @@ -207,7 +207,7 @@ int MTriangle6::getNumEdgesRep(){ return 3 * CTX::instance()->mesh.numSubEdges; static void _myGetEdgeRep(MTriangle *t, int num, double *x, double *y, double *z, SVector3 *n, int numSubEdges) { - n[0] = n[1] = n[2] = t->getFace(0).normal(); + n[0] = n[1] = t->getFace(0).normal(); if (num < numSubEdges){ SPoint3 pnt1, pnt2; -- GitLab