From 8297d8f0cbf5eb0367868071e1a1ea2f019e2327 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 20 Feb 2009 11:41:30 +0000 Subject: [PATCH] From Humar Carmona, "When reading a DXF file, the reader breaks at a debug assertion at vector (it breaks on release version). Inspecting the code show that the cause could be in dxfEntity.cpp. It seems that the problem is an offending "short" used in a for loop, where it should be "int" or "long". It causes an index out of range error. " Merged from svn trunk using: svn merge -r 9803:9804 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/dxf/dxfEntity.cpp --- src/osgPlugins/dxf/dxfEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/dxf/dxfEntity.cpp b/src/osgPlugins/dxf/dxfEntity.cpp index 739da693e..27e0b5809 100644 --- a/src/osgPlugins/dxf/dxfEntity.cpp +++ b/src/osgPlugins/dxf/dxfEntity.cpp @@ -597,7 +597,7 @@ dxfPolyline::drawScene(scene* sc) // is there a flag 1 or 32 for 64? } else { // simple polyline? - for (short i = _vertices.size()-1; i >= 0; i--) + for (int i = _vertices.size()-1; i >= 0; i--) vlist.push_back(_vertices[i]->getVertex()); if (_flag & 1) { // std::cout << "line loop " << _vertices.size() << std::endl;