From 27e8d05ee8aa9e26b3fb925f841b228e082b45c2 Mon Sep 17 00:00:00 2001 From: jsentity Date: Sun, 18 Jan 2026 21:42:34 +0100 Subject: [PATCH] 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 Co-authored-by: jsentity Co-committed-by: jsentity --- lib/std/os/uefi/protocol/device_path.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os/uefi/protocol/device_path.zig b/lib/std/os/uefi/protocol/device_path.zig index 7ca2b942e1..7fa8090df7 100644 --- a/lib/std/os/uefi/protocol/device_path.zig +++ b/lib/std/os/uefi/protocol/device_path.zig @@ -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;