mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 13:57:14 -05:00
Fix the last even line of bytes
linq does the job cleaner than ugly math...
This commit is contained in:
@@ -174,7 +174,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, i*count, i+1<s.Length ? count : data.Length % count).Replace('-', ' ');
|
||||
s[i] = BitConverter.ToString(data.Skip(i*4).Take(count).ToArray()).Replace('-', ' ');
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user