From 784047e199347e6c6d6d0b0b245c503dcd163694 Mon Sep 17 00:00:00 2001 From: Adrien Prokopowicz Date: Sat, 15 Aug 2015 21:32:33 +0000 Subject: [PATCH] [GB.XML] * BUG: Fix attribute initialization method. git-svn-id: svn://localhost/gambas/trunk@7226 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.xml/src/element.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gb.xml/src/element.cpp b/gb.xml/src/element.cpp index 371e4666f..3a6a2282d 100644 --- a/gb.xml/src/element.cpp +++ b/gb.xml/src/element.cpp @@ -305,6 +305,11 @@ Attribute* XMLAttribute_New(const char *nattrName, const size_t nlenAttrName, newAttr->attrValue = (char*)malloc(nlenAttrVal); memcpy(newAttr->attrValue, nattrVal, nlenAttrVal); } + else + { + newAttr->attrValue = 0; + newAttr->lenAttrValue = 0; + } return newAttr; }