summaryrefslogtreecommitdiff
path: root/src/construction.c
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2025-11-23 12:40:14 +0100
committerJesper Jensen <jesper@jnsn.dev>2025-11-23 12:40:14 +0100
commit9c0110122693400366bd52a49b7d4645eae3de57 (patch)
treeadf879efa78fdb34d605b8d636a02ade1f50f672 /src/construction.c
parente63c2a09a54c28dbcaaee48de2008fd5c3a7bf81 (diff)
Explicitly state the parameter index
Diffstat (limited to 'src/construction.c')
-rw-r--r--src/construction.c3
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);