From 71428d542eb7ab2aa38fe46aea76f8a1a3c63d97 Mon Sep 17 00:00:00 2001 From: Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com> Date: Sat, 23 May 2020 18:02:06 +0200 Subject: [PATCH] ImportMapAcresAll: update CopyTo index to 0 (#245) The second parameter of `Array.CopyTo` takes an integer that represents the index in array at which copying begins. Therefore in this case it should be set to 0 instead of the array's length. --- NHSE.WinForms/Subforms/Map/MapDumpHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NHSE.WinForms/Subforms/Map/MapDumpHelper.cs b/NHSE.WinForms/Subforms/Map/MapDumpHelper.cs index 85ca084..82f851e 100644 --- a/NHSE.WinForms/Subforms/Map/MapDumpHelper.cs +++ b/NHSE.WinForms/Subforms/Map/MapDumpHelper.cs @@ -245,8 +245,8 @@ public static bool ImportMapAcresAll(byte[] data) return false; } - modified.CopyTo(data, modified.Length); + modified.CopyTo(data, 0); return true; } } -} \ No newline at end of file +}