about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Src/lex.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c10e772a..048b355b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-05-10  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 38468: Src/lex.c: wb,we values in gotword() needed assignment in
+	additional case to avoid core dump (bug introduced by 38248)
+
 	* 38463: Src/Zle/zle_keymap.c: use immortal widgets in .safe keymap
 
 2016-05-10  Daniel Shahaf  <d.s@daniel.shahaf.name>
@@ -200,9 +203,9 @@
 
 2016-04-07  Barton E. Schaefer  <schaefer@zsh.org>
 
-	* 38248: Src/Zle/zle_tricky.c: fix word position calculation
-	when completing on or just before a redirection operator; the
-	completion result is still in need of some repair
+	* 38248: Src/lex.c, Src/Zle/zle_tricky.c: fix word position
+	calculation when completing on or just before a redirection
+	operator; the completion result is still in need of some repair
 
 2016-04-03  Barton E. Schaefer  <schaefer@zsh.org>
 
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;
     }