1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

22760: fix partial string length reports with NO_MULTIBYTE

This commit is contained in:
Peter Stephenson 2017-07-02 20:29:00 +01:00
parent e19955614f
commit e8edd42f7f
3 changed files with 26 additions and 1 deletions

View file

@ -5417,7 +5417,7 @@ mb_metastrlenend(char *ptr, int width, char *eptr)
int num, num_in_char, complete;
if (!isset(MULTIBYTE))
return ztrlen(ptr);
return eptr ? (int)(eptr - ptr) : ztrlen(ptr);
laststart = ptr;
ret = MB_INVALID;