From b5512c45fb9362021104d71326fdeb0d6219ac84 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 31 May 2020 17:11:26 -0300 Subject: [PATCH] fix fetching of lv2 params --- src/lang.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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| {