Skip to content

Commit

Permalink
lib: zero-init color_ramp array
Browse files Browse the repository at this point in the history
The dyn array thing I wrote assumes zero-initialized array structs.
  • Loading branch information
vkoskiv committed Jan 16, 2024
1 parent 3998e99 commit c145fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/nodes/converter/color_ramp.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const struct colorNode *new_color_ramp(const struct node_storage *s,
logr(warning, "color_ramp: No control points provided, bailing out\n");
return newConstantTexture(s, g_pink_color);
}
struct ramp_element_arr element_arr;
struct ramp_element_arr element_arr = { 0 };
for (int i = 0; i < element_count; ++i) {
ramp_element_arr_add(&element_arr, elements[i]);
}
Expand Down

0 comments on commit c145fb2

Please sign in to comment.