mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 18:26:43 +00:00
hotfix invalid read in text_buffer
This commit is contained in:
parent
7d0091f647
commit
7ceb645926
@ -257,12 +257,7 @@ static int text_buffer_append_string(text_buffer_t *buf, char *str, size_t len)
|
|||||||
|
|
||||||
__always_inline
|
__always_inline
|
||||||
static int text_buffer_append_string0(text_buffer_t *buf, char *str) {
|
static int text_buffer_append_string0(text_buffer_t *buf, char *str) {
|
||||||
utf8_int32_t c;
|
return text_buffer_append_string(buf, str, strlen(str));
|
||||||
for (void *v = utf8codepoint(str, &c); c != '\0'; v = utf8codepoint(v, &c)) {
|
|
||||||
if (utf8_validchr2(v)) {
|
|
||||||
text_buffer_append_char(buf, c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__always_inline
|
__always_inline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user