In EventQueueHelper.uintToByteArray, fetch big end-ian bytes directly from libomv rather than little endian then swapping

This avoids a problem with failing to swap on big-endian machines.
This addresses http://opensimulator.org/mantis/view.php?id=4849
Thanks to Valy- for pointing this out and submitting a suggestion patch
prebuild-update
Justin Clark-Casey (justincc) 2010-08-14 00:48:12 +01:00
parent fcc83f2305
commit 1463691cb6
1 changed files with 4 additions and 6 deletions

View File

@ -54,12 +54,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
} }
private static byte[] uintToByteArray(uint uIntValue) private static byte[] uintToByteArray(uint uIntValue)
{ {
byte[] resultbytes = Utils.UIntToBytes(uIntValue); byte[] result = new byte[4];
if (BitConverter.IsLittleEndian) Utils.UIntToBytesBig(uIntValue, result, 0);
Array.Reverse(resultbytes); return result;
return resultbytes;
} }
public static OSD buildEvent(string eventName, OSD eventBody) public static OSD buildEvent(string eventName, OSD eventBody)