diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index d7dcf196a2..de42bf8d51 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -730,10 +730,10 @@ namespace OpenSim.Framework // used for RemoteParcelRequest (for "About Landmark") public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { byte[] bytes = { - (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32), - (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle, - (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x, - (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y }; + (byte)regionHandle, (byte)(regionHandle >> 8), (byte)(regionHandle >> 16), (byte)(regionHandle >> 24), + (byte)(regionHandle >> 32), (byte)(regionHandle >> 40), (byte)(regionHandle >> 48), (byte)(regionHandle << 56), + (byte)x, (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24), + (byte)y, (byte)(y >> 8), (byte)(y >> 16), (byte)(y >> 24) }; return new UUID(bytes, 0); } @@ -741,9 +741,7 @@ namespace OpenSim.Framework byte[] bytes = parcelID.GetBytes(); regionHandle = Helpers.BytesToUInt64(bytes); x = Helpers.BytesToUInt(bytes, 8); - // grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0. - //uint y = Helpers.BytesToUInt(bytes, 12); - y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]); + y = Helpers.BytesToUInt(bytes, 12); } } }