From c9040fa6a8b360e8bd5e53b40855b5f3f799eec3 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 4 Nov 2015 23:15:11 -0800 Subject: [PATCH] Fix getHexLines bug Now skips the proper amount of bytes, yields the intended result. --- pk3DS/Tools/Scripts.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pk3DS/Tools/Scripts.cs b/pk3DS/Tools/Scripts.cs index 3cbabf8..565fa05 100644 --- a/pk3DS/Tools/Scripts.cs +++ b/pk3DS/Tools/Scripts.cs @@ -191,7 +191,7 @@ internal static string[] getHexLines(byte[] data, int count = 4) // Generates an x-byte wide space separated string array; leftovers included at the end. string[] s = new string[data.Length/count + ((data.Length % count > 0) ? 1 : 0)]; for (int i = 0; i < s.Length;i++) - s[i] = BitConverter.ToString(data.Skip(i*4).Take(count).ToArray()).Replace('-', ' '); + s[i] = BitConverter.ToString(data.Skip(i*count).Take(count).ToArray()).Replace('-', ' '); return s; } internal static string[] getHexLines(uint[] data)