mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
Guard against nullfunc
This commit is contained in:
parent
ab2a4f1318
commit
db182819ae
1 changed files with 4 additions and 5 deletions
9
intrin.c
9
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)))
|
if ((find = intrin_func_try(intrin, offsetof(intrin_func_t, alias), name)))
|
||||||
return find;
|
return find;
|
||||||
|
|
||||||
if (from)
|
if (from) {
|
||||||
intrin_error(intrin, "need function `%s', compiler depends on it for `__builtin_%s'", name, from);
|
intrin_error(intrin, "need function `%s', compiler depends on it for `__builtin_%s'", name, from);
|
||||||
else
|
return intrin_func_self(intrin, "#nullfunc", NULL);
|
||||||
intrin_error(intrin, "need function `%s', compiler depends on it", name);
|
}
|
||||||
|
return NULL;
|
||||||
return intrin_func(intrin, "#nullfunc");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_expression *intrin_func(intrin_t *intrin, const char *name) {
|
ast_expression *intrin_func(intrin_t *intrin, const char *name) {
|
||||||
|
|
Loading…
Reference in a new issue