Przeglądaj źródła

Correctly sizing bool fields

(cherry picked from commit ec978589086f80c8a93ada8fedcd3376c3d990fc)

Source commit: 3d824cd618144776b6ac8989ee8f53a8fd139181
Martin Prikryl 5 lat temu
rodzic
commit
b3b6a5479d
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      dotnet/internal/ConsoleCommStruct.cs

+ 4 - 0
dotnet/internal/ConsoleCommStruct.cs

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