about 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 8dc836329..33b6598b9 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -219,7 +219,7 @@ lexsave(void)
     ls->hlinesz = hlinesz;
     ls->cstack = cmdstack;
     ls->csp = cmdsp;
-    cmdstack = (unsigned char *)zalloc(256);
+    cmdstack = (unsigned char *)zalloc(CMDSTACKSZ);
     ls->tok = tok;
     ls->isnewlin = isnewlin;
     ls->tokstr = tokstr;
@@ -1150,7 +1150,7 @@ gettokstr(int c, int sub)
 	    cmdpush(CS_BQUOTE);
 	    SETPARBEGIN
 	    inquote = 0;
-	    while ((c = hgetc()) != '`' && !lexstop)
+	    while ((c = hgetc()) != '`' && !lexstop) {
 		if (c == '\\') {
 		    c = hgetc();
 		    if (c != '\n') {
@@ -1171,6 +1171,7 @@ gettokstr(int c, int sub)
 			    ALLOWHIST
 		    }
 		}
+	    }
 	    if (inquote)
 		ALLOWHIST
 	    cmdpop();