From f8b1d3104af6ca644d64669004393e7e6217b52f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 19 Nov 2022 15:36:18 +0100 Subject: [PATCH] :art: tmpl_info security --- src/lib/tmpl_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/tmpl_info.c b/src/lib/tmpl_info.c index 6d9d4833..4e8e34b7 100644 --- a/src/lib/tmpl_info.c +++ b/src/lib/tmpl_info.c @@ -100,7 +100,8 @@ ANN Type tmpl_exists(const Env env, struct tmpl_info *const info) { ANN bool tmpl_global(const Env env, Type_List tl) { for(uint32_t i = 0; i < tl->len; i++) { Type_Decl *td = *mp_vector_at(tl, Type_Decl*, i); - if(!type_global(env, known_type(env, td))) + const Type t = known_type(env, td); + if(!t && !type_global(env, t)) return false; } return true; -- 2.43.0