about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-05-10 23:17:19 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2016-05-10 23:17:19 -0700
commitc712e7511a6b450e6833aead65ef8b8c0bc70ff1 (patch)
tree7faa1354be0bbe227d66e909c2512d72c17d7c2b /Src/lex.c
parent597fa5ee5d1bda8f91f6f0e4716c5fccc9927cf6 (diff)
downloadzsh-c712e7511a6b450e6833aead65ef8b8c0bc70ff1.tar.gz
zsh-c712e7511a6b450e6833aead65ef8b8c0bc70ff1.tar.xz
zsh-c712e7511a6b450e6833aead65ef8b8c0bc70ff1.zip
38468: wb,we values in gotword() needed assignment in additional case to avoid core dump
Bug introduced by 38248.

Also fix ChangeLog entry for 38248 to correctly reference Src/lex.c
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 25b372a3c..e36a01ec8 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1795,6 +1795,10 @@ gotword(void)
 	if (zlemetacs >= nwb) {
 	    wb = nwb;
 	    we = nwe;
+	} else {
+	    wb = zlemetacs + addedx;
+	    if (we < wb)
+		we = wb;
 	}
 	lexflags = 0;
     }