From e202698a0051aa40fc3e91501f624c895f4f82d8 Mon Sep 17 00:00:00 2001 From: Riccardo Binetti Date: Wed, 6 Jul 2022 22:46:28 +0200 Subject: [PATCH] pin: remove erroneous access to slice length (#56) The slice itself has to be used instead --- src/core/pin.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/pin.zig b/src/core/pin.zig index 1bd4868..5fccbaf 100644 --- a/src/core/pin.zig +++ b/src/core/pin.zig @@ -28,7 +28,7 @@ pub fn Pin(comptime spec: []const u8) type { chip.parsePin(spec); return struct { - pub const name = if (std.mem.startsWith(u8, spec, board_namespace.len)) + pub const name = if (std.mem.startsWith(u8, spec, board_namespace)) // Remove the board: prefix spec[board_namespace.len..] else if (std.mem.startsWith(u8, spec, chip_namespace))