From fed4d91ecc3a4548af088400fab169d88066125a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 28 May 2013 15:18:59 +0000 Subject: [PATCH] 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. --- src/osgPlugins/ive/Text.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/ive/Text.cpp b/src/osgPlugins/ive/Text.cpp index 0031a0810..ae9da298f 100644 --- a/src/osgPlugins/ive/Text.cpp +++ b/src/osgPlugins/ive/Text.cpp @@ -129,7 +129,8 @@ void Text::write(DataOutputStream* out){ else { // do it the hardway...output each character as an int - osg::ref_ptr strarr = new osg::UIntArray(textstring.size()); + osg::ref_ptr strarr = new osg::UIntArray(); + strarr->reserve(textstring.size()); for(itr=textstring.begin(); itr!=textstring.end();