Ensure valid cookie isn't interpreted as null

Use an explicit type when @ptrCast() is assigned to an optional to ensure the
value isn't interpreted as null.
This commit is contained in:
Karl Seguin
2026-03-13 17:00:59 +08:00
parent ba9777e754
commit 07c3aec34f

View File

@@ -933,7 +933,7 @@ pub const RequestCookie = struct {
if (arr.items.len > 0) { if (arr.items.len > 0) {
try arr.append(temp, 0); //null terminate try arr.append(temp, 0); //null terminate
headers.cookies = @ptrCast(arr.items.ptr); headers.cookies = @as([*c]const u8, @ptrCast(arr.items.ptr));
} }
} }
}; };