icsharpcode/ILSpy — pull request #306 by jbevain (2012-01-19 14:39:13+00:00)
Title: Fix InitializeArray decompilation for initialize values with padding

For the following code:

```csharp
class Foo {
private static byte[] bytes = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12 };
}
```

gmcs emits code which calls into RuntimeHelpers.InitializeArray, but the InitialValue of the field is padded. This patch fixes it by simply allowing initial values that are longer or with the same size than the expected size from the IL.