diff --git a/src/osgPlugins/osg/Uniform.cpp b/src/osgPlugins/osg/Uniform.cpp index 132f965c5..979dcc47b 100644 --- a/src/osgPlugins/osg/Uniform.cpp +++ b/src/osgPlugins/osg/Uniform.cpp @@ -41,10 +41,10 @@ bool Uniform_readLocalData(Object& obj, Input& fr) // TODO read uniform value based on type - if (fr.matchSequence("type %w")) + if (fr[0].isWord()) { - uniform.setType( Uniform::getTypeId(fr[1].getStr()) ); - fr+=2; + uniform.setType( Uniform::getTypeId(fr[0].getStr()) ); + fr+=1; iteratorAdvanced = true; } @@ -227,6 +227,10 @@ bool Uniform_readLocalData(Object& obj, Input& fr) osg::notify(osg::WARN)<<"Warning : type not supported for reading."<