mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Do not assume pointers are 32-bit in several Windows device calls.
This commit is contained in:
@@ -737,7 +737,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
commandData.deviceDataBufferSize];
|
||||
IntPtr hBuf = Marshal.AllocHGlobal(commandB.Length);
|
||||
Marshal.StructureToPtr(commandData, hBuf, true);
|
||||
IntPtr descriptorOffset = new IntPtr(hBuf.ToInt32() + commandData.size);
|
||||
IntPtr descriptorOffset = IntPtr.Add(hBuf, commandData.size);
|
||||
Marshal.StructureToPtr(commandDescriptor, descriptorOffset, true);
|
||||
Marshal.Copy(hBuf, commandB, 0, commandB.Length);
|
||||
Marshal.FreeHGlobal(hBuf);
|
||||
|
||||
Reference in New Issue
Block a user