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 08e5376fa0
commit f5f268baf7

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,