We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2fa54a commit 73dfe91Copy full SHA for 73dfe91
src/eval.c
@@ -19774,7 +19774,12 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
19774
charlen = get_tv_number(&argvars[2]);
19775
while (charlen > 0 && nbyte + len < slen)
19776
{
19777
- len += mb_char2len(p[nbyte + len]);
+ int off = nbyte + len;
19778
+
19779
+ if (off < 0)
19780
+ len += 1;
19781
+ else
19782
+ len += mb_char2len(p[off]);
19783
--charlen;
19784
}
19785
src/version.c
@@ -753,6 +753,8 @@ static char *(features[]) =
753
754
static int included_patches[] =
755
{ /* Add new patch number below this line */
756
+/**/
757
+ 1779,
758
/**/
759
1778,
760
0 commit comments