mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
Fix protocol.DevicePath.next() (#30883)
fix for https://codeberg.org/ziglang/zig/issues/30882 Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30883 Reviewed-by: Andrew Kelley <andrew@ziglang.org> Co-authored-by: jsentity <jsentity@noreply.codeberg.org> Co-committed-by: jsentity <jsentity@noreply.codeberg.org>
This commit is contained in:
parent
d2dda0737b
commit
27e8d05ee8
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ pub const DevicePath = extern struct {
|
|||
pub fn next(self: *const DevicePath) ?*const DevicePath {
|
||||
const bytes: [*]const u8 = @ptrCast(self);
|
||||
const next_node: *const DevicePath = @ptrCast(bytes + self.length);
|
||||
if (next_node.type == .end and @as(uefi.DevicePath.End.Subtype, @enumFromInt(self.subtype)) == .end_entire)
|
||||
if (next_node.type == .end and @as(uefi.DevicePath.End.Subtype, @enumFromInt(next_node.subtype)) == .end_entire)
|
||||
return null;
|
||||
|
||||
return next_node;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue