Patch 7.4.1779
Problem: Using negative index in strcharpart(). (Yegappan Lakshmanan)
Solution: Assume single byte when using a negative iindex.
Files: src/eval.c
*** ../vim-7.4.1778/src/eval.c 2016-04-22 20:46:42.988145173 +0200
--- src/eval.c 2016-04-23 13:50:34.475097381 +0200
***************
*** 19774,19780 ****
charlen = get_tv_number(&argvars[2]);
while (charlen > 0 && nbyte + len < slen)
{
! len += mb_char2len(p[nbyte + len]);
--charlen;
}
}
--- 19774,19785 ----
charlen = get_tv_number(&argvars[2]);
while (charlen > 0 && nbyte + len < slen)
{
! int off = nbyte + len;
!
! if (off < 0)
! len += 1;
! else
! len += mb_char2len(p[off]);
--charlen;
}
}
*** ../vim-7.4.1778/src/version.c 2016-04-22 21:11:03.836844513 +0200
--- src/version.c 2016-04-23 13:53:14.573485085 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1779,
/**/
--
BLACK KNIGHT: I move for no man.
ARTHUR: So be it!
[hah] [parry thrust]
[ARTHUR chops the BLACK KNIGHT's left arm off]
ARTHUR: Now stand aside, worthy adversary.
BLACK KNIGHT: 'Tis but a scratch.
The Quest for the Holy Grail (Monty Python)
/// 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.