mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -06:00
Performance fix in dom_chars_handler: use g_strndup instead of g_strdup
Because the origin string can be extraordinarly long, you get more benefit from this than you would imagine
This commit is contained in:
parent
1a5c2dd254
commit
aaeb639d07
@ -95,7 +95,7 @@ static gboolean dom_chars_handler (
|
||||
{
|
||||
if (length > 0)
|
||||
{
|
||||
gchar* newtext = g_strdup (text);
|
||||
gchar* newtext = g_strndup (text,length);
|
||||
xmlNodeAddContentLen ((xmlNodePtr)parent_data,
|
||||
checked_char_cast (newtext), length);
|
||||
g_free (newtext);
|
||||
|
Loading…
Reference in New Issue
Block a user