[GB.XML]
* BUG: XmlReader: Reading empty attributes should not crash anymore. git-svn-id: svn://localhost/gambas/trunk@8119 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
3db3310dcd
commit
c6102c762f
2 changed files with 25 additions and 0 deletions
|
@ -276,6 +276,12 @@ if(!THISOBJ->curAttrEnum)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!THISOBJ->curAttrEnum->attrName || !THISOBJ->curAttrEnum->lenAttrName)
|
||||
{
|
||||
GB.ReturnNull();
|
||||
return;
|
||||
}
|
||||
|
||||
GB.ReturnNewString(THISOBJ->curAttrEnum->attrName, THISOBJ->curAttrEnum->lenAttrName);
|
||||
|
||||
END_PROPERTY
|
||||
|
@ -289,6 +295,12 @@ if(!THISOBJ->curAttrEnum)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!THISOBJ->curAttrEnum->attrValue || !THISOBJ->curAttrEnum->lenAttrValue)
|
||||
{
|
||||
GB.ReturnNull();
|
||||
return;
|
||||
}
|
||||
|
||||
GB.ReturnNewString(THISOBJ->curAttrEnum->attrValue, THISOBJ->curAttrEnum->lenAttrValue);
|
||||
|
||||
END_PROPERTY
|
||||
|
|
|
@ -194,6 +194,13 @@ if(!THIS->curAttrEnum)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!THIS->curAttrEnum->attrName || !THIS->curAttrEnum->lenAttrName)
|
||||
{
|
||||
GB.ReturnNull();
|
||||
return;
|
||||
}
|
||||
|
||||
GB.ReturnNewString(THIS->curAttrEnum->attrName, THIS->curAttrEnum->lenAttrName);
|
||||
|
||||
END_PROPERTY
|
||||
|
@ -207,6 +214,12 @@ if(!THIS->curAttrEnum)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!THIS->curAttrEnum->attrValue || !THIS->curAttrEnum->lenAttrValue)
|
||||
{
|
||||
GB.ReturnNull();
|
||||
return;
|
||||
}
|
||||
|
||||
GB.ReturnNewString(THIS->curAttrEnum->attrValue, THIS->curAttrEnum->lenAttrValue);
|
||||
|
||||
END_PROPERTY
|
||||
|
|
Loading…
Reference in a new issue