mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue