fix(debashify): fix empty array debashify segfault
This commit is contained in:
parent
84ac0fa0ff
commit
8a64d4e207
1 changed files with 3 additions and 0 deletions
|
|
@ -551,6 +551,9 @@ bool debashify_array_set(cmd_t* in, debashify_params* params)
|
|||
arglist_t* args = parse_arglist( make_context(gen) ).first;
|
||||
cmd_t* c = new cmd_t(args);
|
||||
// cmd first argument is _lxsh_X_create
|
||||
if(c->args == nullptr) {
|
||||
c->args = new arglist_t;
|
||||
}
|
||||
if(params->arrays[varname])
|
||||
{
|
||||
c->args->insert(0, new arg_t("_lxsh_map_create") );
|
||||
|
|
|
|||
Loading…
Reference in a new issue