Skip to content

Commit 6143829

Browse files
jonathanpeppersjonpryor
authored andcommitted
[xa-prep-tasks] fix bad Array.Copy() call (#722)
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 macOS, I suspect Mono isn't validating input the same way as Windows and it _happens_ to work.
1 parent c04c952 commit 6143829

File tree

1 file changed

+1
-1
lines changed
  • build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks

1 file changed

+1
-1
lines changed

build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/Which.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static Which ()
3333
FileExtensions = new string [(pathExts?.Length ?? 0) + 1];
3434
FileExtensions [0] = null;
3535
if (pathExts != null) {
36-
Array.Copy (pathExts, 0, FileExtensions, 1, pathExt.Length);
36+
Array.Copy (pathExts, 0, FileExtensions, 1, pathExts.Length);
3737
}
3838
}
3939

0 commit comments

Comments
 (0)