summaryrefslogtreecommitdiff
path: root/src/qcommon/q_platform.h
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-07-17 01:41:39 +0000
committerTim Angus <tim@ngus.net>2013-01-10 22:30:00 +0000
commit8573ded969056c0029e1103944b60f8dc472f185 (patch)
tree037ca502b6600ac444f83fe3b815d23aaa4ed5c3 /src/qcommon/q_platform.h
parent3155cba037535b8a703498f85ec9ad5e1d6f2f52 (diff)
Fix alignment issues in message sending/reading that would crash IRIX, thanks to Canavan for supplying a shell where I could fix this (#5077)
Diffstat (limited to 'src/qcommon/q_platform.h')
-rw-r--r--src/qcommon/q_platform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qcommon/q_platform.h b/src/qcommon/q_platform.h
index 85b176eb..f4335489 100644
--- a/src/qcommon/q_platform.h
+++ b/src/qcommon/q_platform.h
@@ -349,6 +349,8 @@ float FloatSwap (const float *f);
#error "Endianness defined as both big and little"
#elif defined( Q3_BIG_ENDIAN )
+#define CopyLittleShort(dest, src) CopyShortSwap(dest, src)
+#define CopyLittleLong(dest, src) CopyLongSwap(dest, src)
#define LittleShort(x) ShortSwap(x)
#define LittleLong(x) LongSwap(x)
#define LittleFloat(x) FloatSwap(&x)
@@ -358,6 +360,8 @@ float FloatSwap (const float *f);
#elif defined( Q3_LITTLE_ENDIAN )
+#define CopyLittleShort(dest, src) Com_Memcpy(dest, src, 2)
+#define CopyLittleLong(dest, src) Com_Memcpy(dest, src, 4)
#define LittleShort
#define LittleLong
#define LittleFloat