From 93ecd02b3fee9f5f0917daf8cff59c29fb005379 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 31 May 2026 17:24:34 +0100 Subject: [PATCH] fx: string: handle string_duplicate not copying the null terminator --- fx/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fx/string.c b/fx/string.c index 68a584d..6c9976c 100644 --- a/fx/string.c +++ b/fx/string.c @@ -301,7 +301,7 @@ static fx_string *string_duplicate(const struct fx_string_p *str) const char *src = string_ptr(str); 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_codepoints = str->s_codepoints;