diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index ef9bd7389..4bd82130c 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -171,7 +171,9 @@ build_struct (int su, symbol_t *tag, symtab_t *symtab, type_t *type) if (!type) sym->type = find_type (sym->type); // checks the tag, not the symtab sym->type->t.symtab = symtab; - sym->type->alignment = alignment; + if (alignment > sym->type->alignment) { + sym->type->alignment = alignment; + } if (!type && sym->type->type_def->external) //FIXME should not be necessary sym->type->type_def = qfo_encode_type (sym->type, pr.type_data); return sym; diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index 3c6a4a683..bccf431b7 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -74,7 +74,7 @@ type_t type_function = { ev_func, "function", 1, ty_basic, {{&type_void}} }; type_t type_pointer = { ev_pointer, "pointer", 1, ty_basic, {{&type_void}} }; -type_t type_quaternion = { ev_quat, "quaternion", 1 }; +type_t type_quaternion = { ev_quat, "quaternion", 4 }; type_t type_integer = { ev_integer, "int", 1 }; type_t type_uinteger = { ev_uinteger, "uint", 1 }; type_t type_short = { ev_short, "short", 1 };