From d01524ee6442a9f709112a4bf4463976294a00eb Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 7 Aug 2017 09:35:04 -0500 Subject: [PATCH] [xa-prep-tasks] fix bad Array.Copy call On Windows, Array.Copy will throw an `ArgumentException` for various Git MSBuild tasks. Turns out the call is using the wrong variable: the string instead of the array. I am not sure why this works on OSX, I suspect Mono isn't validating input the same way as Windows and it _happens_ to work. --- .../xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs index cfd1903c9b3..33ca0a3d234 100644 --- a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs +++ b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs @@ -33,7 +33,7 @@ static Which () FileExtensions = new string [(pathExts?.Length ?? 0) + 1]; FileExtensions [0] = null; if (pathExts != null) { - Array.Copy (pathExts, 0, FileExtensions, 1, pathExt.Length); + Array.Copy (pathExts, 0, FileExtensions, 1, pathExts.Length); } }