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.

vec_-functions induce UB #3

@Loli-Ruri

Description

@Loli-Ruri
#define vec_unpack_(v)\
    (char**)&(v)->data, &(v)->length, &(v)->capacity, sizeof(*(v)->data)

Strictly speaking, (char**)&(v)->data is only correctly defined when data actually is a char-pointer, elsewise dereferencing this pointer in your functions causes undefined behaviour.

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