diff --git a/libs/gamecode/convert.py b/libs/gamecode/convert.py index ce3637c7c..b148eb1c2 100644 --- a/libs/gamecode/convert.py +++ b/libs/gamecode/convert.py @@ -110,7 +110,7 @@ for width in range(4): elif width == 2: print(f"{case} VectorCompUop(&{dst},{cast},&{src}); break;") else: - expand = expand_str(width, src, f"({types[dst_type]})") + expand = expand_str(width, src, f"(pr_{types[dst_type]}_t)") print(f"{case} {dst} = {cast} {expand}; break;") elif mode == 2: one = one_str(width, src_type) diff --git a/tools/qfcc/source/value.c b/tools/qfcc/source/value.c index 59de51d21..54972f4d0 100644 --- a/tools/qfcc/source/value.c +++ b/tools/qfcc/source/value.c @@ -59,6 +59,12 @@ #include "tools/qfcc/include/type.h" #include "tools/qfcc/include/value.h" +//FIXME I don't like this being here (or aligned_alloc being necessary in +//the first place, but not at all sure what to do about that) +#ifdef _WIN32 +#define aligned_alloc(al, sz) _aligned_malloc(sz, al) +#endif + typedef struct { def_t *def; union {