]>
Commit | Line | Data |
---|---|---|
05649561 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.244 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.2.244 | |
11 | Problem: ':echo "\xf7"' displays the illegal byte as if it was a character | |
12 | and leaves "cho" after it. | |
13 | Solution: When checking the length of a UTF-8 byte sequence and it's shorter | |
14 | than the number of bytes available, assume it's an illegal byte. | |
15 | Files: src/mbyte.c | |
16 | ||
17 | ||
18 | *** ../vim-6.2.243/src/mbyte.c Sun Jan 11 12:45:02 2004 | |
19 | --- src/mbyte.c Sun Feb 8 15:12:29 2004 | |
20 | *************** | |
21 | *** 1442,1448 **** | |
22 | if (*p == NUL) | |
23 | return 1; | |
24 | len = utf8len_tab[*p]; | |
25 | ! for (i = 1; i < len && i < size; ++i) | |
26 | if ((p[i] & 0xc0) != 0x80) | |
27 | return 1; | |
28 | return len; | |
29 | --- 1442,1450 ---- | |
30 | if (*p == NUL) | |
31 | return 1; | |
32 | len = utf8len_tab[*p]; | |
33 | ! if (len > size) | |
34 | ! return 1; /* Probably illegal byte sequence. */ | |
35 | ! for (i = 1; i < len; ++i) | |
36 | if ((p[i] & 0xc0) != 0x80) | |
37 | return 1; | |
38 | return len; | |
39 | *** ../vim-6.2.243/src/version.c Sun Feb 8 14:41:05 2004 | |
40 | --- src/version.c Sun Feb 8 15:10:55 2004 | |
41 | *************** | |
42 | *** 639,640 **** | |
43 | --- 639,642 ---- | |
44 | { /* Add new patch number below this line */ | |
45 | + /**/ | |
46 | + 244, | |
47 | /**/ | |
48 | ||
49 | -- | |
50 | hundred-and-one symptoms of being an internet addict: | |
51 | 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE | |
52 | ||
53 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
54 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
55 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
56 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |