summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_word.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a7449ca4..b1dea8da3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-08-12  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 39031: Src/Zle/zle_word.c: Ensure variables are initialised in
+	transpose-words.
+
 	* 39029: Doc/Zsh/zle.yo: document previous change.
 
 	* Han Pingtian: 38983: Src/Zle/zle_word.c: make transpose-words
diff --git a/Src/Zle/zle_word.c b/Src/Zle/zle_word.c
index 2a151710a..e4a878eab 100644
--- a/Src/Zle/zle_word.c
+++ b/Src/Zle/zle_word.c
@@ -722,7 +722,7 @@ transposewords(UNUSED(char **args))
     if (!p3)
 	return 1;
 
-    pt = p3;
+    p1 = p2 = pt = p3;
 
     while (n--) {
 	for (p2 = pt; p2; ) {