Patch 8.0.1230
Problem: CTRL-A in Visual mode uses character after selection. (Nikolai
Pavlov)
Solution: Check the length before using a character.
Files: src/charset.c
*** ../vim-8.0.1229/src/charset.c 2017-10-28 15:38:35.403474381 +0200
--- src/charset.c 2017-10-28 16:07:07.199752812 +0200
***************
*** 1852,1858 ****
* If "what" contains STR2NR_OCT recognize octal numbers
* If "what" contains STR2NR_HEX recognize hex numbers
* If "what" contains STR2NR_FORCE always assume bin/oct/hex.
! * If maxlen > 0, check at a maximum maxlen chars
*/
void
vim_str2nr(
--- 1852,1858 ----
* If "what" contains STR2NR_OCT recognize octal numbers
* If "what" contains STR2NR_HEX recognize hex numbers
* If "what" contains STR2NR_FORCE always assume bin/oct/hex.
! * If maxlen > 0, check at a maximum maxlen chars.
*/
void
vim_str2nr(
***************
*** 1900,1906 ****
if (what & STR2NR_OCT)
{
/* Don't interpret "0", "08" or "0129" as octal. */
! for (n = 1; VIM_ISDIGIT(ptr[n]); ++n)
{
if (ptr[n] > '7')
{
--- 1900,1906 ----
if (what & STR2NR_OCT)
{
/* Don't interpret "0", "08" or "0129" as octal. */
! for (n = 1; n != maxlen && VIM_ISDIGIT(ptr[n]); ++n)
{
if (ptr[n] > '7')
{
***************
*** 1908,1915 ****
break;
}
pre = '0'; /* assume octal */
- if (n == maxlen)
- break;
}
}
}
--- 1908,1913 ----
*** ../vim-8.0.1229/src/version.c 2017-10-28 15:38:35.403474381 +0200
--- src/version.c 2017-10-28 15:56:25.480148183 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1230,
/**/
--
TIM: Too late.
ARTHUR: What?
TIM: There he is!
[They all turn, and see a large white RABBIT lollop a few yards out of the
cave. Accompanied by terrifying chord and jarring metallic monster noise.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.