From 5f939c37af256276a68ee9ca43c58a0d98730775 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Thu, 3 Apr 2025 10:26:39 -0400 Subject: Explicitly specify the size of connection options This makes it so specifying the wrong number of options would actually throw a compile time error. --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 5741b2d..cacd2fc 100644 --- a/src/main.zig +++ b/src/main.zig @@ -7,7 +7,7 @@ const SaprusPacketType = enum(u16) { connection = 0x00E9, }; -const SaprusConnectionOptions = packed struct { +const SaprusConnectionOptions = packed struct(u8) { opt1: bool = false, opt2: bool = false, opt3: bool = false, -- cgit