summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 5b6d3a69b..841fb0b86 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1346,8 +1346,10 @@ gettokstr(int c, int sub)
     }
   brk:
     if (errflag) {
-	while(bct-- >= in_brace_param)
-	    cmdpop();
+	if (in_brace_param) {
+	    while(bct-- >= in_brace_param)
+		cmdpop();
+	}
 	return LEXERR;
     }
     hungetc(c);