about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/lex.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dae844431..67d2419ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-05-04  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
+	* 11145: Src/lex.c: parse_subst_string() should use modified
+ 	version of `len'
+	
 	* 11144: Src/Modules/zpty.c: make pty the controlling terminal of
 	their commands
 
diff --git a/Src/lex.c b/Src/lex.c
index 6ba6b49b0..53c46f5d3 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1447,7 +1447,7 @@ parsestr(char *s)
 int
 parse_subst_string(char *s)
 {
-    int c, l = strlen(s), err;
+    int c, l = strlen(s), err, olen;
 
     if (! *s)
 	return 0;
@@ -1464,6 +1464,7 @@ parse_subst_string(char *s)
     strinend();
     inpop();
     DPUTS(cmdsp, "BUG: parse_subst_string: cmdstack not empty.");
+    olen = len;
     lexrestore();
     errflag = err;
     if (c == LEXERR) {
@@ -1471,9 +1472,9 @@ parse_subst_string(char *s)
 	return 1;
     }
 #ifdef DEBUG
-    if (c != STRING || len != l || errflag) {
+    if (c != STRING || olen != l || errflag) {
 	fprintf(stderr, "Oops. Bug in parse_subst_string: %s\n",
-		len < l ? "len < l" : errflag ? "errflag" : "c != STRING");
+		olen < l ? "len < l" : errflag ? "errflag" : "c != STRING");
 	fflush(stderr);
 	untokenize(s);
 	return 1;