From 9145e3bac7748d4123462808e74d4f01d9fb897b Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 20 Jun 2026 15:23:26 +0100 Subject: [PATCH] fx: string: fix remove_ansi() not updating codepoints count --- fx/string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fx/string.c b/fx/string.c index 83d6d9e..cf0b0a9 100644 --- a/fx/string.c +++ b/fx/string.c @@ -513,7 +513,8 @@ static enum fx_status remove_ansi( memmove(removal_start, excess_src, excess_length); s[new_str_len] = '\0'; - str->s_len = new_str_len; + str->s_len -= length; + str->s_codepoints -= length; return FX_SUCCESS; }