diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-11-23 12:40:14 +0100 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-11-23 12:40:14 +0100 |
| commit | 9c0110122693400366bd52a49b7d4645eae3de57 (patch) | |
| tree | adf879efa78fdb34d605b8d636a02ade1f50f672 /src/construction.c | |
| parent | e63c2a09a54c28dbcaaee48de2008fd5c3a7bf81 (diff) | |
Explicitly state the parameter index
Diffstat (limited to 'src/construction.c')
| -rw-r--r-- | src/construction.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/construction.c b/src/construction.c index 6e3cd6e..b73ee69 100644 --- a/src/construction.c +++ b/src/construction.c @@ -68,12 +68,11 @@ struct element* insert_cmd(struct drawing *drawing, struct command cmd) { void execute_drawing(struct drawing *drawing, double inputs[]) { - size_t input_i = 0; for(struct command *current = drawing->root; current != NULL; current = current->next) { switch(current->op) { case CMD_VALUE_INPUT: { assert(current->result.type == ETYPE_VALUE); - current->result.value = inputs[input_i++]; + current->result.value = inputs[current->index]; }break; case CMD_ORIGIN: { assert(current->result.type == ETYPE_POINT); |
