summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eval.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index f7f0aeb..29db5c1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -874,6 +874,12 @@ bail:
 			i = exception;
 			if (i == EXEXIT)
 				goto raise;
+			if (i == EXEVAL) {
+				if (oldlvl == shlvl)
+					goto trap;
+				else
+					goto raise;
+			}
 
 			status = 2;
 			j = 0;
@@ -885,11 +891,11 @@ bail:
 				status = j + 128;
 			exitstatus = status;
 
-			if (i == EXINT || (i != EXEVAL && spclbltin > 0) ||
-			    oldlvl != shlvl) {
+			if (i == EXINT || spclbltin > 0) {
 raise:
 				longjmp(handler->loc, 1);
 			}
+trap:
 			FORCEINTON;
 		}
 		break;