From: Dale Weiler Date: Sat, 23 Nov 2013 15:58:03 +0000 (-0500) Subject: Guard against nullfunc X-Git-Tag: xonotic-v0.8.0~68 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db182819ae7148811986380a66e0ca13762672a5;p=xonotic%2Fgmqcc.git Guard against nullfunc --- diff --git a/intrin.c b/intrin.c index d642d30..3fa0d70 100644 --- a/intrin.c +++ b/intrin.c @@ -902,12 +902,11 @@ static ast_expression *intrin_func_self(intrin_t *intrin, const char *name, cons if ((find = intrin_func_try(intrin, offsetof(intrin_func_t, alias), name))) return find; - if (from) + if (from) { intrin_error(intrin, "need function `%s', compiler depends on it for `__builtin_%s'", name, from); - else - intrin_error(intrin, "need function `%s', compiler depends on it", name); - - return intrin_func(intrin, "#nullfunc"); + return intrin_func_self(intrin, "#nullfunc", NULL); + } + return NULL; } ast_expression *intrin_func(intrin_t *intrin, const char *name) {