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:
AsmArtisan256 2025-07-18 20:07:05 +01:00 committed by GitHub
parent 6e55898661
commit 69cf40da60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,7 +214,7 @@ pub const File = extern struct {
pub fn getInfo(
self: *const File,
comptime info: std.meta.Tag(Info),
buffer: []u8,
buffer: []align(@alignOf(@FieldType(Info, @tagName(info)))) u8,
) GetInfoError!*@FieldType(Info, @tagName(info)) {
const InfoType = @FieldType(Info, @tagName(info));