Fixed memory error associated with reading over the end of container due to an unbounded while loop.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14866 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
180ce288c3
commit
2e11113072
@ -369,12 +369,11 @@ void Text3D::computeGlyphRepresentation()
|
|||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itr!=_text.end())
|
// skip over spaces
|
||||||
{
|
while ((itr!=_text.end()) && (*itr==' ')) ++itr;
|
||||||
// skip over spaces and return.
|
|
||||||
while (*itr==' ') ++itr;
|
// skip over return
|
||||||
if (*itr=='\n') ++itr;
|
if ((itr!=_text.end()) && (*itr=='\n')) ++itr;
|
||||||
}
|
|
||||||
|
|
||||||
// move to new line.
|
// move to new line.
|
||||||
switch(_layout)
|
switch(_layout)
|
||||||
|
Loading…
Reference in New Issue
Block a user