title: Marshal.StructureToPtr fails with bool and fixed size array?
body: <p>If I marshal this struct with <code>StructureToPtr</code> and then unmarshal it again with <code>PtrToStructure</code>, my first node has y = {1,2} whilst my second node has y = {1,0}.</p>
  
  <p>I've no idea why, perhaps my struct is bad somehow? Removing the <code>bool</code> from the struct makes it work.</p>
  
  <pre><code>using System;
  using System.Runtime.InteropServices;
  
  namespace csharp_test
  {
      unsafe class Program
      {
          [StructLayout(LayoutKind.Sequential)]
          public struct Node
          {
              public bool boolVar;
              public fixed int y[2];
          }
  
          unsafe static void Main(string[] args)
          {
              Node node = new Node();
  
              node.y[0] = 1;
              node.y[1] = 2;
              node.boolVar = true;
  
              int size = sizeof(Node);
              IntPtr ptr = Marshal.AllocHGlobal(size);
              Marshal.StructureToPtr(node, ptr, false);
              Node node2 = (Node)Marshal.PtrToStructure(ptr, typeof(Node));
              Marshal.FreeHGlobal(ptr);
          }
      }
  }
  </code></pre>