1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00

Count characters correctly in 'str_as_multibyte'

* src/character.c (str_as_multibyte): Increment CHARS for each
character produced, not just once.
This commit is contained in:
Pip Cet 2026-03-16 15:33:58 +00:00
parent 88600757ae
commit aa90b0fb4a

View file

@ -637,8 +637,8 @@ str_as_multibyte (unsigned char *str, ptrdiff_t len, ptrdiff_t nbytes,
c = BYTE8_TO_CHAR (c);
to += CHAR_STRING (c, to);
}
chars++;
}
chars++;
}
while (p < endp)
{