[qfcc] Make pointer-function casts two-way

This fixes the cast for the think function in game-source/fbxa.
This commit is contained in:
Bill Currie 2025-01-20 00:57:54 +09:00
parent c88820c31e
commit f92ab4f64b

View file

@ -111,7 +111,8 @@ cast_expr (const type_t *dstType, const expr_t *e)
|| (is_enum (dstType) && srcType == type_default)) { || (is_enum (dstType) && srcType == type_default)) {
return e; return e;
} }
if ((is_pointer (dstType) && is_func (srcType))) { if ((is_pointer (dstType) && is_func (srcType))
|| (is_func (dstType) && is_pointer (srcType))) {
return new_alias_expr (dstType, e); return new_alias_expr (dstType, e);
} }
if ((is_pointer (dstType) && is_string (srcType)) if ((is_pointer (dstType) && is_string (srcType))