mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Align cast operands
I'm surprised alignment didn't bite me earlier. Fixes a surprise segfault in vecconst.r.
This commit is contained in:
parent
8853d56af3
commit
dcd2505bb9
1 changed files with 3 additions and 2 deletions
|
@ -72,8 +72,9 @@ do_conversion (pr_type_t *dst_value, const type_t *dstType,
|
|||
static const expr_t *
|
||||
cast_math (const type_t *dstType, const type_t *srcType, const expr_t *expr)
|
||||
{
|
||||
pr_type_t src_value[type_size (srcType)];
|
||||
pr_type_t dst_value[type_size (dstType)];
|
||||
#define ALIGN [[gnu::aligned(alignof(pr_lvec4_t))]]
|
||||
pr_type_t src_value[type_size (srcType)] ALIGN;
|
||||
pr_type_t dst_value[type_size (dstType)] ALIGN;
|
||||
|
||||
value_store (src_value, srcType, expr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue