summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/extended.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/extended.zig b/src/extended.zig
index 9427b83..b94f6f5 100644
--- a/src/extended.zig
+++ b/src/extended.zig
@@ -167,7 +167,7 @@ pub const Command = struct {
167 inline for(command.params) |param, i| { 167 inline for(command.params) |param, i| {
168 comptime const field = "result." ++ param.field; 168 comptime const field = "result." ++ param.field;
169 169
170 if (arg.id == i and (param.position ?? pos) == pos) { 170 if (arg.param.id == i and (param.position ?? pos) == pos) {
171 if (param.takes_value) |parser| { 171 if (param.takes_value) |parser| {
172 try parser.parse(getFieldPtr(&result, field), ??arg.value); 172 try parser.parse(getFieldPtr(&result, field), ??arg.value);
173 } else { 173 } else {
@@ -183,7 +183,7 @@ pub const Command = struct {
183 comptime var sub_command = c; 183 comptime var sub_command = c;
184 sub_command.parent = command; 184 sub_command.parent = command;
185 185
186 if (arg.id == i + command.params.len) { 186 if (arg.param.id == i + command.params.len) {
187 getFieldPtr(&result, field).* = try sub_command.parseHelper(&result, allocator, arg_iter); 187 getFieldPtr(&result, field).* = try sub_command.parseHelper(&result, allocator, arg_iter);
188 continue :arg_loop; 188 continue :arg_loop;
189 } 189 }