mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.os.uefi.protocol.file: fix getInfo() buffer alignment (#24496)
* std.os.uefi.protocol.file: use @alignCast in getInfo() method to fix #24480 * std.os.uefi.protocol.file: pass alignment responsabilities to caller by redefining the buffer type instead of blindly calling @alignCast
This commit is contained in:
parent
6e55898661
commit
69cf40da60
@ -214,7 +214,7 @@ pub const File = extern struct {
|
|||||||
pub fn getInfo(
|
pub fn getInfo(
|
||||||
self: *const File,
|
self: *const File,
|
||||||
comptime info: std.meta.Tag(Info),
|
comptime info: std.meta.Tag(Info),
|
||||||
buffer: []u8,
|
buffer: []align(@alignOf(@FieldType(Info, @tagName(info)))) u8,
|
||||||
) GetInfoError!*@FieldType(Info, @tagName(info)) {
|
) GetInfoError!*@FieldType(Info, @tagName(info)) {
|
||||||
const InfoType = @FieldType(Info, @tagName(info));
|
const InfoType = @FieldType(Info, @tagName(info));
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user