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;
|
||||
}
|
||||
|
||||
if (itr!=_text.end())
|
||||
{
|
||||
// skip over spaces and return.
|
||||
while (*itr==' ') ++itr;
|
||||
if (*itr=='\n') ++itr;
|
||||
}
|
||||
// skip over spaces
|
||||
while ((itr!=_text.end()) && (*itr==' ')) ++itr;
|
||||
|
||||
// skip over return
|
||||
if ((itr!=_text.end()) && (*itr=='\n')) ++itr;
|
||||
|
||||
// move to new line.
|
||||
switch(_layout)
|
||||
|
Loading…
Reference in New Issue
Block a user