Hirohito Higashi wrote:
> Hi Bram and List,
>
> 2016-4-23(Sat) 20:56:05 UTC+9 Bram Moolenaar:
> > 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,
> > /**/
>
> strcharpart() with multibyte(more 3byte) does not work properly.
> I wrote a patch.
> Please check an attached patch. (file encoding is utf-8)
Thanks!
--
FATHER: You killed eight wedding guests in all!
LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
FATHER: I can understand that.
"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.