Blender Git Loki

Git Commits -> Revision 457302b

Revision 457302b by Campbell Barton (master)
August 28, 2021, 12:50 (GMT)
BLI_string_utf8: add buffer size arg to BLI_str_utf8_from_unicode

Besides helping to avoid buffer overflow errors this reduces complexity
of BLI_str_utf32_as_utf8 which needed a special loop for the last 6
characters to avoid writing past the buffer bounds.

Also add BLI_str_utf8_from_unicode_len which only returns the length.

Commit Details:

Full Hash: 457302b67b9de6a92240c2736306cfa01187101d
Parent Commit: 079791d
Lines Changed: +84, -93

6 Modified Paths:

/source/blender/blenkernel/intern/object_dupli.cc (+2, -2) (Diff)
/source/blender/blenkernel/intern/text.c (+4, -3) (Diff)
/source/blender/blenlib/BLI_string_utf8.h (+3, -1) (Diff)
/source/blender/blenlib/intern/string_utf8.c (+73, -85) (Diff)
/source/blender/editors/space_console/console_ops.c (+1, -1) (Diff)
/source/blender/editors/space_text/text_ops.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021