summary refs log tree commit diff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c
index 2cd931b..337667f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -847,9 +847,11 @@ bail:
 		/* NOTREACHED */
 
 	case CMDBUILTIN:
-		poplocalvars(spclbltin > 0 || argc == 0);
-		if (execcmd && argc > 1)
-			listsetvar(varlist.list, VEXPORT);
+		if (spclbltin > 0 || argc == 0) {
+			poplocalvars(1);
+			if (execcmd && argc > 1)
+				listsetvar(varlist.list, VEXPORT);
+		}
 		if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
 			int status;
 			int i;