about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/parse.c b/Src/parse.c
index f0a66ea12..89ef68688 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1199,6 +1199,10 @@ par_if(int *complex)
 	type = (xtok == IF ? WC_IF_IF : WC_IF_ELIF);
 	par_save_list(complex);
 	incmdpos = 1;
+	if (tok == ENDINPUT) {
+	    cmdpop();
+	    YYERRORV(oecused);
+	}
 	while (tok == SEPER)
 	    zshlex();
 	xtok = FI;