Hacker News new | ask | show | jobs
by patrick451 1202 days ago
> The handling of endptr in DYN_ARR_RESIZE seems to be incorrect. If I have an array with 2 elements and capacity of 3 and I DYN_ARR_RESIZE it to 5, I now have an array with 5 elements, 3 of which are garbage values.

Why do you say this is wrong? That's exactly what I would expect.

1 comments

> Why do you say this is wrong?

Exposing uninitialized memory as valid values tends to be a really bad idea.