From 803e95a883a5d3881f662d60cd1a24309bafd4de Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 30 Oct 2026 13:56:38 +0100 Subject: WIP --- src/prc1/sym.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/prc1/sym.c') diff --git a/src/prc1/sym.c b/src/prc1/sym.c index 69d3bca..3ba2937 100644 --- a/src/prc1/sym.c +++ b/src/prc1/sym.c @@ -364,7 +364,7 @@ static const struct type *genlittype(struct prv *p) { const struct fn *fn = fn_cur(p); const char *tr = triplet(p); - const struct type *byte = type_find(fn, tr, "char"); + const struct type *byte = type_find(fn, tr, "char"), *ret; struct type *bytedup = NULL, *t = NULL; if (!byte) @@ -384,7 +384,10 @@ static const struct type *genlittype(struct prv *p) .child = bytedup }; - return p->ast->littype = type_insert(p, t); + if (!(ret = type_insert(p, t))) + goto failure; + + return p->ast->littype = ret; failure: free(t); -- cgit v1.2.3