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

idx for vec_insert is evaluated twice #9

@JerwuQu

Description

@JerwuQu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions