From 43f1c0121b0f0cb99c1caf567e2fb2aa1a636587 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 1 Apr 2003 15:08:30 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20spotted=20and=20fix=20by=20S=C3=A9bastien?= =?UTF-8?q?=20Kuntz.=20Changed=20<=20to=20<=3D=20on=20Geometry.cpp,=20in?= =?UTF-8?q?=20removePrimitiveSet(),=20if(=20i+numElementsToRemove<=5Fprimi?= =?UTF-8?q?tives.size()=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/osg/Geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 0a33856e6..b5bb8df00 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -332,7 +332,7 @@ bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemo { if (i<_primitives.size() && numElementsToRemove>0) { - if (i+numElementsToRemove<_primitives.size()) + if (i+numElementsToRemove<=_primitives.size()) { _primitives.erase(_primitives.begin()+i,_primitives.begin()+i+numElementsToRemove); }