]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/readline/readline52-014
installer: Reserve some space for RAID metadata.
[ipfire-2.x.git] / src / patches / readline / readline52-014
CommitLineData
f19b3cb6
MT
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 5.2
5Patch-ID: readline52-014
6
7Bug-Reported-by: Len Lattanzi <llattanzi@apple.com>
8Bug-Reference-ID: <52B1297F-6675-45CC-B63E-24745337D006@apple.com>
9Bug-Reference-URL:
10
11Bug-Description:
12
13On systems where mbrtowc() returns -2 when passed a length argument with
14value 0, when using a multibyte locale, Readline's emacs-mode forward-char
15at the end of a line will leave the point beyond the end of the line.
16
17Patch:
18
19*** ../readline-5.2-patched/mbutil.c 2009-05-29 23:09:26.000000000 -0400
20--- mbutil.c 2009-05-29 23:10:12.000000000 -0400
21***************
22*** 78,82 ****
23 int seed, count, find_non_zero;
24 {
25! size_t tmp;
26 mbstate_t ps;
27 int point;
28--- 78,82 ----
29 int seed, count, find_non_zero;
30 {
31! size_t tmp, len;
32 mbstate_t ps;
33 int point;
34***************
35*** 99,103 ****
36 while (count > 0)
37 {
38! tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps);
39 if (MB_INVALIDCH ((size_t)tmp))
40 {
41--- 99,106 ----
42 while (count > 0)
43 {
44! len = strlen (string + point);
45! if (len == 0)
46! break;
47! tmp = mbrtowc (&wc, string+point, len, &ps);
48 if (MB_INVALIDCH ((size_t)tmp))
49 {