mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-04 10:35:27 +08:00
Fix copy behavior when out-of-memory
Also remove accidentally committed pragma pack :-/ git-svn-id: https://pugixml.googlecode.com/svn/trunk@1041 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
59409f70ef
commit
e376ba731f
@ -1,4 +1,3 @@
|
|||||||
#pragma pack(push, 16)
|
|
||||||
/**
|
/**
|
||||||
* pugixml parser - version 1.4
|
* pugixml parser - version 1.4
|
||||||
* --------------------------------------------------------
|
* --------------------------------------------------------
|
||||||
@ -3666,13 +3665,16 @@ PUGI__NS_BEGIN
|
|||||||
{
|
{
|
||||||
xml_node copy(append_new_node(destit.internal_object(), alloc, sourceit.type()));
|
xml_node copy(append_new_node(destit.internal_object(), alloc, sourceit.type()));
|
||||||
|
|
||||||
node_copy_contents(copy, sourceit, shared_alloc);
|
if (copy)
|
||||||
|
|
||||||
if (sourceit.first_child())
|
|
||||||
{
|
{
|
||||||
destit = copy;
|
node_copy_contents(copy, sourceit, shared_alloc);
|
||||||
sourceit = sourceit.first_child();
|
|
||||||
continue;
|
if (sourceit.first_child())
|
||||||
|
{
|
||||||
|
destit = copy;
|
||||||
|
sourceit = sourceit.first_child();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user