From b6a8a93cc319b2252ac86a1d3bcad9b77ddea155 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 4 Feb 2022 22:03:26 +0900 Subject: [PATCH] [qfcc] Treat vectors and quaternions as non-scalars Fixes a segfault when initializing vectors thai was caused by the earlier block init fix. --- tools/qfcc/source/type.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index b0882519c..c9a3c6d75 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -969,6 +969,9 @@ int is_nonscalar (const type_t *type) { type = unalias_type (type); + if (is_vector (type) || is_quaternion (type)) { + return 1; + } if (type->width < 2) { return 0; }