Fix alignment issues in message sending/reading that would crash IRIX, thanks to Canavan for supplying a shell where I could fix this (#5077)
This commit is contained in:
1 parent
4c5e9963e3
commit
242c938d7f
3 files changed
+51
-18
No files matched your search
@@ -129,6 +129,24 @@ float BigFloat (const float *l) {return _BigFloat(l);}
|
||||
float LittleFloat (const float *l) {return _LittleFloat(l);}
|
||||
*/
|
||||
|
||||
void CopyShortSwap(void *dest, void *src)
|
||||
{
|
||||
byte *to = dest, *from = src;
|
||||
|
||||
to[0] = from[1];
|
||||
to[1] = from[0];
|
||||
}
|
||||
|
||||
void CopyLongSwap(void *dest, void *src)
|
||||
{
|
||||
byte *to = dest, *from = src;
|
||||
|
||||
to[0] = from[3];
|
||||
to[1] = from[2];
|
||||
to[2] = from[1];
|
||||
to[3] = from[0];
|
||||
}
|
||||
|
||||
short ShortSwap (short l)
|
||||
{
|
||||
byte b1,b2;
|
||||
|
||||
Reference in new issue
Block a user