From: fennecdjay Date: Sat, 19 Nov 2022 14:36:18 +0000 (+0100) Subject: :art: tmpl_info security X-Git-Tag: nightly~207^2~79 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f8b1d3104af6ca644d64669004393e7e6217b52f;p=gwion.git :art: tmpl_info security --- 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;