cwObject.cpp : objectFromString() now returns an error when the 'lexId' is set to kErrorLexTId.
This commit is contained in:
parent
842b0ca86c
commit
332c8309f6
@ -937,10 +937,13 @@ cw::rc_t cw::objectFromString( const char* s, object_t*& objRef )
|
|||||||
// then make the parent 'object' the current node
|
// then make the parent 'object' the current node
|
||||||
if( cnp->is_pair() && cnp->child_count()==2 )
|
if( cnp->is_pair() && cnp->child_count()==2 )
|
||||||
cnp = cnp->parent;
|
cnp = cnp->parent;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( lexId == lex::kErrorLexTId )
|
||||||
|
{
|
||||||
|
goto errLabel;
|
||||||
|
}
|
||||||
|
|
||||||
// if the root has only one child then make the child the root
|
// if the root has only one child then make the child the root
|
||||||
if( root != nullptr && root->child_count() == 1 )
|
if( root != nullptr && root->child_count() == 1 )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user