diff options
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r-- | common/cmd_nvedit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 947d6c4ed6..fab8694621 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -273,6 +273,10 @@ int setenv(const char *varname, const char *varvalue) { const char * const argv[4] = { "setenv", varname, varvalue, NULL }; + /* before import into hashtable */ + if (!(gd->flags & GD_FLG_ENV_READY)) + return 1; + if (varvalue == NULL || varvalue[0] == '\0') return _do_env_set(0, 2, (char * const *)argv); else |