harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d3406b24cd4d899cd4d587513429e39cb682641f
parent f8c31fe2efec7226a383db8ee77c7a1e96a87f49
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  1 Feb 2021 12:58:53 -0500

type store: assert tagged members have size

Diffstat:
Msrc/type_store.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/type_store.c b/src/type_store.c @@ -293,6 +293,7 @@ tagged_init(struct type *type, struct type_tagged_union **tu, size_t nmemb) struct type_tagged_union **next = &type->tagged.next; for (size_t i = 1; i < nmemb; ++i) { + assert(tu[i]->type->size != SIZE_UNDEFINED); // TODO if (tu[i]->type->size > type->size) { type->size = tu[i]->type->size; }