command: add missing ptrCast

While a lot of values will implicitly coerce to this field value,
slices annoyingly do not and thus the explicit cast is required.
This commit is contained in:
torque 2023-08-04 00:15:29 -07:00
parent 29175d07ce
commit d091de5686
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk

View File

@ -358,7 +358,7 @@ pub fn CommandBuilder(comptime UserContext: type) type {
fields = fields ++ &[_]StructField{.{ fields = fields ++ &[_]StructField{.{
.name = param.name, .name = param.name,
.type = FieldType, .type = FieldType,
.default_value = default, .default_value = @ptrCast(default),
.is_comptime = false, .is_comptime = false,
.alignment = @alignOf(FieldType), .alignment = @alignOf(FieldType),
}}; }};