mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
set a zero char right after attrib value instead of memset
This commit is contained in:
@@ -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;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user