aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 8bef78546..75a72ea0c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -9200,7 +9200,8 @@ poplocalvars(void)
memcpy(optlist, lvp->text, sizeof(optlist));
free((char*)lvp->text);
optschanged();
- } else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) {
+ } else if (lvp->flags == VUNSET) {
+ vp->flags &= ~(VSTRFIXED|VREADONLY);
unsetvar(vp->var_text);
} else {
if (vp->var_func)