Explorar o código

Correctly sizing bool fields

(cherry picked from commit ec978589086f80c8a93ada8fedcd3376c3d990fc)

Source commit: 3d824cd618144776b6ac8989ee8f53a8fd139181
Martin Prikryl %!s(int64=5) %!d(string=hai) anos
pai
achega
b3b6a5479d
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      dotnet/internal/ConsoleCommStruct.cs

+ 4 - 0
dotnet/internal/ConsoleCommStruct.cs

@@ -11,7 +11,9 @@ namespace WinSCP
     {
     {
         public uint InputType;
         public uint InputType;
         public uint OutputType;
         public uint OutputType;
+        [MarshalAs(UnmanagedType.I1)]
         public bool WantsProgress; // since version 6
         public bool WantsProgress; // since version 6
+        [MarshalAs(UnmanagedType.I1)]
         public bool UseStdErr; // since version 10
         public bool UseStdErr; // since version 10
         public enum StdInOut { Off, Binary, Chunked }
         public enum StdInOut { Off, Binary, Chunked }
         public StdInOut BinaryOutput; // since version 10
         public StdInOut BinaryOutput; // since version 10
@@ -84,6 +86,7 @@ namespace WinSCP
         public uint OverallProgress;
         public uint OverallProgress;
         public uint FileProgress;
         public uint FileProgress;
         public uint CPS;
         public uint CPS;
+        [MarshalAs(UnmanagedType.I1)]
         public bool Cancel; // since version 8
         public bool Cancel; // since version 8
     }
     }
 
 
@@ -94,6 +97,7 @@ namespace WinSCP
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20480)]
         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20480)]
         public byte[] Data;
         public byte[] Data;
         public UIntPtr Len;
         public UIntPtr Len;
+        [MarshalAs(UnmanagedType.I1)]
         public bool Error; // TransferIn only
         public bool Error; // TransferIn only
     }
     }