diff --git a/src/debashify.cpp b/src/debashify.cpp index c35c5e3..b7a3bdf 100644 --- a/src/debashify.cpp +++ b/src/debashify.cpp @@ -334,6 +334,8 @@ bool debashify_readonly(list* in) } } } + if(in->cls.size()<=0) + in->add(make_condlist("true")); return has_found; } diff --git a/src/processing.cpp b/src/processing.cpp index ace54c4..7a4e746 100644 --- a/src/processing.cpp +++ b/src/processing.cpp @@ -419,6 +419,8 @@ bool r_delete_var(_obj* in, set_t* vars) t->cls.erase(t->cls.begin()+i); i--; } + if(t->cls.size()<=0) + t->add(make_condlist("true")); } } default: break; @@ -567,6 +569,7 @@ std::string gen_json_struc(_obj* o) vec.push_back(std::make_pair(quote_string("type"), quote_string("redirect") ) ); vec.push_back(std::make_pair(quote_string("op"), quote_string(t->op))); vec.push_back(std::make_pair(quote_string("target"), gen_json_struc(t->target))); + vec.push_back(std::make_pair(quote_string("here_document"), gen_json_struc(t->here_document))); break; } case _obj::_arg :