about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Zle/zle_hist.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b7d1e8a38..88d2b69d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-18  Peter Stephenson  <pws@csr.com>
+
+	* 27804: Src/Zle/zle_hist.c: don't hang on encountering invalid
+	character in incremental search.
+
 2010-03-17  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Functions/Calendar/calendar: fix embarrassing bug in
@@ -12920,5 +12925,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4935 $
+* $Revision: 1.4936 $
 *****************************************************
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 5b57f4468..241ef419e 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1454,6 +1454,8 @@ doisearch(char **args, int dir, int pattern)
 	    memset(&mbs, 0, sizeof(mbs));
 	    while (charpos < end_pos) {
 		ret = mb_metacharlenconv_r(zlemetaline + charpos, &wc, &mbs);
+		if (ret <= 0) /* Unrecognised, treat as single char */
+		    ret = 1;
 		if (charpos <= pos && pos < charpos + ret)
 		    isearch_startpos = charcount;
 		charcount++;