aboutsummaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
Diffstat (limited to 'readline')
-rw-r--r--readline/readline/isearch.c3
-rw-r--r--readline/readline/mbutil.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/readline/readline/isearch.c b/readline/readline/isearch.c
index 080ba3c..941078f 100644
--- a/readline/readline/isearch.c
+++ b/readline/readline/isearch.c
@@ -882,6 +882,9 @@ _rl_isearch_callback (_rl_search_cxt *cxt)
int c, r;
c = _rl_search_getchar (cxt);
+ if (!RL_ISSTATE (RL_STATE_ISEARCH))
+ return 1;
+
/* We might want to handle EOF here */
r = _rl_isearch_dispatch (cxt, cxt->lastc);
diff --git a/readline/readline/mbutil.c b/readline/readline/mbutil.c
index dc62b4c..7da3ff1 100644
--- a/readline/readline/mbutil.c
+++ b/readline/readline/mbutil.c
@@ -363,7 +363,7 @@ _rl_get_char_len (char *src, mbstate_t *ps)
/* Look at no more than MB_CUR_MAX characters */
l = (size_t)strlen (src);
- if (_rl_utf8locale && l > 0 && UTF8_SINGLEBYTE(*src))
+ if (_rl_utf8locale && l >= 0 && UTF8_SINGLEBYTE(*src))
tmp = (*src != 0) ? 1 : 0;
else
{