From acb59994fcfb83d36efef47810a9dc791c6e542e Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 22 Feb 2023 17:02:57 -0600 Subject: [PATCH] chore: update to latest zig master --- lib/zig-network | 2 +- src/State.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zig-network b/lib/zig-network index a8c4502..45ae8cf 160000 --- a/lib/zig-network +++ b/lib/zig-network @@ -1 +1 @@ -Subproject commit a8c45025385884cfc60996a3b94f1f4af9d2888d +Subproject commit 45ae8cf0ce3972eb4dddad3f5def8613c9b546f3 diff --git a/src/State.zig b/src/State.zig index 93c0e5d..3280150 100644 --- a/src/State.zig +++ b/src/State.zig @@ -47,7 +47,7 @@ const SwBkpt = struct { } pub fn remove(self: *@This(), addr: u32) void { - for (self.list.items) |bkpt, i| { + for (self.list.items, 0..) |bkpt, i| { if (bkpt.addr == addr) { _ = self.list.orderedRemove(i); log.debug("Removed Breakpoint at 0x{X:0>8}", .{addr}); @@ -73,7 +73,7 @@ const HwBkpt = struct { } pub fn add(self: *@This(), addr: u32, kind: u32) !void { - for (self.list) |*bkpt_opt| { + for (&self.list) |*bkpt_opt| { if (bkpt_opt.*) |bkpt| { if (bkpt.addr == addr) return; // idempotent } else { @@ -88,7 +88,7 @@ const HwBkpt = struct { } pub fn remove(self: *@This(), addr: u32) void { - for (self.list) |*bkpt_opt| { + for (&self.list) |*bkpt_opt| { const bkpt = bkpt_opt.* orelse continue; if (bkpt.addr == addr) {