mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
RGB should not be packed, so that it has align = 1
This commit is contained in:
@ -73,9 +73,6 @@ const b64_encoder = std.base64.Base64Encoder.init(b64_alphabet, null);
|
|||||||
const b64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".*;
|
const b64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".*;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
// Unknown why this fails
|
|
||||||
if (builtin.zig_backend != .stage1) return error.SkipZigTest;
|
|
||||||
|
|
||||||
var td = try init();
|
var td = try init();
|
||||||
defer td.deinit();
|
defer td.deinit();
|
||||||
|
|
||||||
|
@ -94,12 +94,13 @@ pub const Name = enum(u8) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// RGB
|
/// RGB
|
||||||
pub const RGB = packed struct {
|
pub const RGB = struct {
|
||||||
r: u8 = 0,
|
r: u8 = 0,
|
||||||
g: u8 = 0,
|
g: u8 = 0,
|
||||||
b: u8 = 0,
|
b: u8 = 0,
|
||||||
|
|
||||||
test {
|
test "size" {
|
||||||
|
try std.testing.expectEqual(@as(usize, 24), @bitSizeOf(RGB));
|
||||||
try std.testing.expectEqual(@as(usize, 3), @sizeOf(RGB));
|
try std.testing.expectEqual(@as(usize, 3), @sizeOf(RGB));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user