cwObject.cpp : objectFromString() now returns an error when the 'lexId' is set to kErrorLexTId.

This commit is contained in:
kevin 2024-07-11 11:02:26 -04:00
parent 842b0ca86c
commit 332c8309f6

View File

@ -937,10 +937,13 @@ cw::rc_t cw::objectFromString( const char* s, object_t*& objRef )
// then make the parent 'object' the current node
if( cnp->is_pair() && cnp->child_count()==2 )
cnp = cnp->parent;
}
if( lexId == lex::kErrorLexTId )
{
goto errLabel;
}
// if the root has only one child then make the child the root
if( root != nullptr && root->child_count() == 1 )
{