pkg/sentry: uuid string is null-terminated

This commit is contained in:
Mitchell Hashimoto
2024-08-31 12:27:36 -07:00
parent 920a1051e5
commit 72c1b00b0b
2 changed files with 22 additions and 21 deletions

View File

@@ -14,8 +14,8 @@ pub const UUID = struct {
return c.sentry_uuid_is_nil(&self.value) != 0;
}
pub fn string(self: UUID) [37]u8 {
var buf: [37]u8 = undefined;
pub fn string(self: UUID) [36:0]u8 {
var buf: [36:0]u8 = undefined;
c.sentry_uuid_as_string(&self.value, &buf);
return buf;
}