mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 20:43:19 +00:00
fix alignment error in uefi FileInfo protocol
previously complained about `[*]const u8` having alignment 1 and `[*:0]const u16` having alignment 2
This commit is contained in:
parent
546212ff7b
commit
b177e17d15
@ -153,7 +153,7 @@ pub const FileInfo = extern struct {
|
||||
attribute: u64,
|
||||
|
||||
pub fn getFileName(self: *const FileInfo) [*:0]const u16 {
|
||||
return @as([*:0]const u16, @ptrCast(@as([*]const u8, @ptrCast(self)) + @sizeOf(FileInfo)));
|
||||
return @ptrCast(@alignCast(@as([*]const u8, @ptrCast(self)) + @sizeOf(FileInfo)));
|
||||
}
|
||||
|
||||
pub const efi_file_read_only: u64 = 0x0000000000000001;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user