fx: string: handle string_duplicate not copying the null terminator

This commit is contained in:
2026-05-31 17:24:34 +01:00
parent 612ba7101d
commit 93ecd02b3f
+1 -1
View File
@@ -301,7 +301,7 @@ static fx_string *string_duplicate(const struct fx_string_p *str)
const char *src = string_ptr(str); const char *src = string_ptr(str);
char *dst = string_ptr(new_str_p); char *dst = string_ptr(new_str_p);
memcpy(dst, src, str->s_len); memcpy(dst, src, str->s_len + 1);
new_str_p->s_len = str->s_len; new_str_p->s_len = str->s_len;
new_str_p->s_codepoints = str->s_codepoints; new_str_p->s_codepoints = str->s_codepoints;