Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lex_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void v_assign_int_to_string (TIXML_STRING & S_string, int i_val)
{
char ca_int [80];

sprintf (ca_int, "%d", i_val);
snprintf (ca_int, sizeof(ca_int), "%d", i_val);
S_string = ca_int;
}

Expand All @@ -229,7 +229,7 @@ void v_assign_double_to_string (TIXML_STRING & S_string, double d_val)
{
char ca_int [80];

sprintf (ca_int, "%f", d_val);
snprintf (ca_int, sizeof(ca_int), "%f", d_val);
while (ca_int [strlen (ca_int) - 1] == '0')
ca_int [strlen (ca_int) - 1] = 0;
if (ca_int [strlen (ca_int) - 1] == '.')
Expand Down
4 changes: 2 additions & 2 deletions tinyxmlparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc

if ( !StringEqual( p, startTag, false, encoding ) )
{
document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
if ( document ) document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
return 0;
}
p += strlen( startTag );
Expand Down Expand Up @@ -1515,7 +1515,7 @@ const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncodi

if ( !StringEqual( p, startTag, false, encoding ) )
{
document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );
if ( document ) document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );
return 0;
}
p += strlen( startTag );
Expand Down
1 change: 1 addition & 0 deletions xpath_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ void xpath_processor::v_execute_one (
if (! o_skip_only)
{
S_name = S_pop_string ();
if (erpp_arg)
v_execute_function (S_name, u_variable, erpp_arg);
}
}
Expand Down