(OpenEntry): use Binary.RotByteR method.

This commit is contained in:
morkt 2015-12-10 20:00:02 +04:00
parent 9c6d59bf70
commit a086c699de

View File

@ -23,6 +23,7 @@
// IN THE SOFTWARE. // IN THE SOFTWARE.
// //
using GameRes.Utility;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.Composition; using System.ComponentModel.Composition;
@ -99,8 +100,7 @@ namespace GameRes.Formats.Will
var data = arc.File.View.ReadBytes (entry.Offset, entry.Size); var data = arc.File.View.ReadBytes (entry.Offset, entry.Size);
for (int i = 0; i < data.Length; ++i) for (int i = 0; i < data.Length; ++i)
{ {
byte b = data[i]; data[i] = Binary.RotByteR (data[i], 2);
data[i] = (byte)(b >> 2 | b << 6);
} }
return new MemoryStream (data); return new MemoryStream (data);
} }