mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
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:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user