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:
parent
4c5e9963e3
commit
242c938d7f
3 changed files with 51 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue