Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

idx for vec_insert is evaluated twice #9

Open
JerwuQu opened this issue Feb 2, 2019 · 0 comments
Open

idx for vec_insert is evaluated twice #9

JerwuQu opened this issue Feb 2, 2019 · 0 comments

Comments

@JerwuQu
Copy link

JerwuQu commented Feb 2, 2019

This causes behavior which the user might not expect and results in segfaults:

int i = 0;
vec_insert(&my_vec, i++, my_value);
// i = 2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant