From 213343c96618736f8d633f9e2c2dd6495e1a23cc Mon Sep 17 00:00:00 2001 From: Adrien Prokopowicz Date: Fri, 15 Jun 2012 19:23:01 +0000 Subject: [PATCH] [GB.XML] * BUG: XmlReader.Node.Attributes.Count now always returns an integer. git-svn-id: svn://localhost/gambas/trunk@4835 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.xml/src/CReader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gb.xml/src/CReader.cpp b/gb.xml/src/CReader.cpp index f7b995b60..2819bc97e 100644 --- a/gb.xml/src/CReader.cpp +++ b/gb.xml/src/CReader.cpp @@ -143,10 +143,14 @@ if(!THIS->foundNode) return; } -if(READ_PROPERTY && THIS->foundNode->isElement()) +if(THIS->foundNode->isElement()) { GB.ReturnInteger(THIS->foundNode->toElement()->attributeCount); } +else +{ +GB.ReturnInteger(0); +} END_PROPERTY