set a zero char right after attrib value instead of memset

This commit is contained in:
nikneym
2025-09-16 10:41:49 +03:00
parent c05470515f
commit 90a96fd8a7

View File

@@ -123,8 +123,8 @@ pub const Mime = struct {
const attribute_value = try parseCharset(value); const attribute_value = try parseCharset(value);
@memcpy(charset[0..attribute_value.len], attribute_value); @memcpy(charset[0..attribute_value.len], attribute_value);
// Fill the rest with zeroes. // Null-terminate right after attribute value.
@memset(charset[attribute_value.len..], 0); charset[attribute_value.len] = 0;
}, },
} }
} }