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