[qfcc] Fix segfault when assigning {}

This commit is contained in:
Bill Currie 2020-03-13 01:59:35 +09:00
parent 9c5fac2226
commit 9c06b22719

View file

@ -322,7 +322,7 @@ assign_expr (expr_t *dst, expr_t *src)
return expr;
}
} else {
if (!is_memset (src) && is_scalar (dst_type)) {
if (!src && is_scalar (dst_type)) {
return error (dst, "empty scalar initializer");
}
src = new_nil_expr ();