X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=blobdiff_plain;f=Novacoin%2FInterop.cs;fp=Novacoin%2FInterop.cs;h=54768cfe4a3f68f71df3cb9294d1a029a382ae17;hp=f3a9e2e4884b4ebd961e78982dec9b4d87fce43b;hb=ecdcad25fc222b09d6458d64b0b02f5950c93d64;hpb=99d4a96f87287e04689f4d3f98975a8d7dcf81ca diff --git a/Novacoin/Interop.cs b/Novacoin/Interop.cs index f3a9e2e..54768cf 100644 --- a/Novacoin/Interop.cs +++ b/Novacoin/Interop.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text; namespace Novacoin @@ -90,10 +91,7 @@ namespace Novacoin trimStart--; } - byte[] result = new byte[trimStart + 1]; - Array.Copy(bytes, 0, result, 0, trimStart + 1); - - return result; + return bytes.Take(trimStart + 1).ToArray(); } public static byte[] AppendWithZeros(byte[] bytes, int nTargetLen=32)