Explicitly specify the size of connection options

This makes it so specifying the wrong number of options would actually throw a compile time error.
This commit is contained in:
2025-04-03 10:26:39 -04:00
parent 322d0b3a52
commit 5f939c37af

View File

@@ -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,