about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/loop.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index afcd12e38..7eb037166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-23  Bart Schaefer  <schaefer@zsh.org>
+
+	* 16124: Src/loop.c: Fix infinite loop on `case' with xtrace
+	(bug introduced by 16041).
+
 2001-10-23  Oliver Kiddle  <opk@zsh.org>
 
 	* 16122: Src/builtin.c, Test/B03print.ztst: only count value
diff --git a/Src/loop.c b/Src/loop.c
index 57ee11695..89ef59689 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -553,9 +553,8 @@ execcase(Estate state, int do_exec)
 	    printprompt4();
 	    fprintf(xtrerr, "case %s (%s)\n", word, pat2);
 	    fflush(xtrerr);
-	    state->pc++;
-	} else
-	    state->pc += 2;
+	}
+	state->pc += 2;
 
 	if (*spprog != dummy_patprog1 && *spprog != dummy_patprog2)
 	    pprog = *spprog;