[qfcc] Support nil in matrix construction

While not used by glsl, ruamoko will and qfcc does internally.
This commit is contained in:
Bill Currie 2025-01-09 17:48:39 +09:00
parent d1364e460c
commit 1d0135be52

View file

@ -102,7 +102,7 @@ construct_by_components (const type_t *type, const expr_t *params,
pexpr = pointer_deref (pexpr);
ptype = dereference_type (ptype);
}
if (!is_math (ptype)) {
if (!is_math (ptype) && !is_nil (pexpr)) {
err = c++;
components[err] = error (pexpr, "invalid type for conversion");
continue;