diff --git a/src/lang.zig b/src/lang.zig index d855a47..d13ef2f 100644 --- a/src/lang.zig +++ b/src/lang.zig @@ -378,7 +378,7 @@ pub const Lang = struct { cmd.split = try std.fmt.parseInt(usize, tok_it.next().?, 10); cmd.index = try std.fmt.parseInt(usize, tok_it.next().?, 10); - inline for (@typeInfo(@typeOf(command_struct.parameters)).Struct.fields) |cmd_field| { + inline for (@typeInfo(@TypeOf(cmd.parameters)).Struct.fields) |cmd_field| { const arg = tok_it.next().?; const argument_value = switch (cmd_field.field_type) { f32 => try std.fmt.parseFloat(f32, arg), @@ -391,7 +391,7 @@ pub const Lang = struct { argument_value, }); - @field(cmd.params, cmd_field.name) = argument_value; + @field(cmd.parameters, cmd_field.name) = argument_value; } } else { inline for (@typeInfo(command_struct).Struct.fields) |cmd_field| {