From a95b7fbfae886ef87d3379f594bdd8e0ab381c67 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Jul 2006 14:30:30 +0000 Subject: [PATCH] Added dummy initializers to avoid warning --- src/osgPlugins/ac3d/ac3d.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/ac3d/ac3d.cpp b/src/osgPlugins/ac3d/ac3d.cpp index 5dcfb661b..508608bb3 100644 --- a/src/osgPlugins/ac3d/ac3d.cpp +++ b/src/osgPlugins/ac3d/ac3d.cpp @@ -721,16 +721,18 @@ osg::Group *ac_load_object(std::istream &f,const ACObject *parent,const osgDB::R osg::Vec3 norm; // Handle surfaces with duplicate vertex indices unsigned short i1=(*nusidx)[0]; - unsigned short i2; - unsigned short i3; + unsigned short i2=i1; + unsigned short i3=i1; int iIndex = 1; while ((iIndex < asurf.num_vertref) && (i1 == (i2 = (*nusidx)[iIndex]))) iIndex++; + if (iIndex < asurf.num_vertref) { iIndex = 1; while ((iIndex < asurf.num_vertref) && ((i1 == (i3 = (*nusidx)[iIndex])) || (i2 == i3))) iIndex++; + if (iIndex < asurf.num_vertref) { osgtri_calc_normal((*vertpool)[i1], (*vertpool)[i2], (*vertpool)[i3], norm);