summaryrefslogtreecommitdiff
path: root/src/core/attr.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-06 22:12:05 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-12-06 22:12:05 +0000
commitb5088a4a633af9184e711ac1cc000bf958eeca3b (patch)
treed345f036b4718830ec7d885671dec5e55a3bd03b /src/core/attr.c
parent6123f0f475fcefff990360572ad7f306a2b62633 (diff)
downloadlibdom-b5088a4a633af9184e711ac1cc000bf958eeca3b.tar.gz
libdom-b5088a4a633af9184e711ac1cc000bf958eeca3b.tar.bz2
Fix copy constructors to actually copy all members, instead of leaving the majority of them uninitialised
svn path=/trunk/libdom/; revision=11023
Diffstat (limited to 'src/core/attr.c')
-rw-r--r--src/core/attr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/attr.c b/src/core/attr.c
index 4cd9e76..b280057 100644
--- a/src/core/attr.c
+++ b/src/core/attr.c
@@ -780,9 +780,18 @@ dom_exception _dom_attr_copy(struct dom_node_internal *new,
dom_attr *oa = (dom_attr *) old;
na->specified = oa->specified;
- na->is_id = oa->is_id;
/* TODO: deal with dom_type_info, it get no definition ! */
+ na->schema_type_info = NULL;
+
+ na->is_id = oa->is_id;
+
+ na->type = oa->type;
+
+ na->value = oa->value;
+
+ /* TODO: is this correct? */
+ na->read_only = false;
return _dom_node_copy(new, old);
}