mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common: Extend utf8_charcount to include the string's length.
* common/stringhelp.c (utf8_charcount): Take additional parameter, len. Process at most LEN bytes. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
b75e1b3d8b
commit
5b84b0d660
4 changed files with 22 additions and 8 deletions
|
@ -1043,7 +1043,7 @@ build_list (const char *text, char letter,
|
|||
if (maybe_setuid)
|
||||
gcry_control (GCRYCTL_INIT_SECMEM, 0, 0); /* Drop setuid. */
|
||||
|
||||
indent = utf8_charcount (text);
|
||||
indent = utf8_charcount (text, -1);
|
||||
len = 0;
|
||||
init_membuf (&mb, 512);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue