Replaced the initialization of the strarray to use reseve instead of a initial size provided in the constructor as this was leading to a bug in output.

This commit is contained in:
Robert Osfield
2013-05-28 15:18:59 +00:00
parent f730396f0a
commit fed4d91ecc

View File

@@ -129,7 +129,8 @@ void Text::write(DataOutputStream* out){
else
{
// do it the hardway...output each character as an int
osg::ref_ptr<osg::UIntArray> strarr = new osg::UIntArray(textstring.size());
osg::ref_ptr<osg::UIntArray> strarr = new osg::UIntArray();
strarr->reserve(textstring.size());
for(itr=textstring.begin();
itr!=textstring.end();