fix segfault on resolve in specific cases

This commit is contained in:
zawz 2021-02-12 14:45:02 +01:00
parent f4907b4e4d
commit 652e238c64

View file

@ -239,7 +239,7 @@ std::pair< std::vector<arg*> , bool > resolve_arg(arg* in, shmain* parent, bool
continue;
subshell_subarg* tsh = dynamic_cast<subshell_subarg*>(in->sa[i]);
if(tsh->sbsh->lst->cls.size() > 1) // skip if more than one cl
if(tsh->sbsh->lst->cls.size() != 1) // skip if not one cl
continue;
condlist* tc = tsh->sbsh->lst->cls[0];
cmd* c = tc->first_cmd();