OSC: add comptime check for size of OSC Command

pull/7429/head
Jeffrey C. Ollie 2025-05-24 11:37:34 -05:00
parent bcf4d55dad
commit 5fb32fd8a0
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 6 additions and 1 deletions

View File

@ -189,7 +189,7 @@ pub const Command = union(enum) {
}
};
pub const List = std.SegmentedList(ColorOperation, 4);
pub const List = std.SegmentedList(ColorOperation, 2);
pub const Kind = union(enum) {
palette: u8,
@ -213,6 +213,11 @@ pub const Command = union(enum) {
indeterminate,
pause,
};
comptime {
assert(@sizeOf(Command) == 64);
// @compileLog(@sizeOf(Command));
}
};
/// The terminator used to end an OSC command. For OSC commands that demand