diff options
author | Justin Clark-Casey (justincc) | 2010-08-14 00:48:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-14 00:48:12 +0100 |
commit | 1463691cb6d022efbb2a0c5742a032f03a940cee (patch) | |
tree | 239631714134b0e897dc624da39fee28af6f6e08 /OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |
parent | Unit test for ConfigurationLoader. (diff) | |
download | opensim-SC_OLD-1463691cb6d022efbb2a0c5742a032f03a940cee.zip opensim-SC_OLD-1463691cb6d022efbb2a0c5742a032f03a940cee.tar.gz opensim-SC_OLD-1463691cb6d022efbb2a0c5742a032f03a940cee.tar.bz2 opensim-SC_OLD-1463691cb6d022efbb2a0c5742a032f03a940cee.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index efa60bb..53a2a7d 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -54,12 +54,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
54 | } | 54 | } |
55 | 55 | ||
56 | private static byte[] uintToByteArray(uint uIntValue) | 56 | private static byte[] uintToByteArray(uint uIntValue) |
57 | { | 57 | { |
58 | byte[] resultbytes = Utils.UIntToBytes(uIntValue); | 58 | byte[] result = new byte[4]; |
59 | if (BitConverter.IsLittleEndian) | 59 | Utils.UIntToBytesBig(uIntValue, result, 0); |
60 | Array.Reverse(resultbytes); | 60 | return result; |
61 | |||
62 | return resultbytes; | ||
63 | } | 61 | } |
64 | 62 | ||
65 | public static OSD buildEvent(string eventName, OSD eventBody) | 63 | public static OSD buildEvent(string eventName, OSD eventBody) |