fix bugs in shell putenv and getenv style variables. add more unit tests.

This commit is contained in:
Axel Kohlmeyer
2021-04-09 20:19:04 -04:00
parent 08471cb88e
commit a69c5a5cae
4 changed files with 24 additions and 10 deletions

View File

@ -341,8 +341,7 @@ void Variable::set(int narg, char **arg)
which[nvar] = 0;
pad[nvar] = 0;
data[nvar] = new char*[num[nvar]];
copy(1,&arg[2],data[nvar]);
data[nvar][1] = utils::strdup("(undefined)");
data[nvar][0] = utils::strdup(arg[2]);
// SCALARFILE for strings or numbers
// which = 1st value