mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
opengl: for an array, size is just the size of the type
This commit is contained in:
@ -73,8 +73,8 @@ pub const Binding = struct {
|
||||
ptr: *const anyopaque,
|
||||
} {
|
||||
return switch (@typeInfo(@TypeOf(data))) {
|
||||
.Array => |ary| .{
|
||||
.size = @sizeOf(ary.child) * ary.len,
|
||||
.Array => .{
|
||||
.size = @sizeOf(@TypeOf(data)),
|
||||
.ptr = &data,
|
||||
},
|
||||
.Pointer => |ptr| switch (ptr.size) {
|
||||
|
Reference in New Issue
Block a user