File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
vendor/cegui-0.4.0-custom/src/tinyxml Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -722,9 +722,11 @@ void TiXmlElement::SetAttribute( const char * name, int val )
722722
723723void TiXmlElement::SetDoubleAttribute ( const char * name, double val )
724724{
725- char buf[128 ];
726- sprintf ( buf, " %f" , val );
725+ #define TIXML_DOUBLE_BUFFER_SIZE 128
726+ char buf[TIXML_DOUBLE_BUFFER_SIZE];
727+ snprintf ( buf, TIXML_DOUBLE_BUFFER_SIZE, " %f" , val );
727728 SetAttribute ( name, buf );
729+ #undef TIXML_DOUBLE_BUFFER_SIZE
728730}
729731
730732
@@ -1141,7 +1143,7 @@ void TiXmlAttribute::SetIntValue( int _value )
11411143void TiXmlAttribute::SetDoubleValue ( double _value )
11421144{
11431145 char buf [64 ];
1144- sprintf (buf, " %lf" , _value);
1146+ snprintf (buf, sizeof (buf) , " %lf" , _value);
11451147 SetValue (buf);
11461148}
11471149
You can’t perform that action at this time.
0 commit comments