mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix unsigned vs. signed problem
This commit is contained in:
@@ -154,10 +154,10 @@ namespace DiscImageChef.Devices
|
|||||||
descriptor.DeviceTypeModifier = descriptorB[9];
|
descriptor.DeviceTypeModifier = descriptorB[9];
|
||||||
descriptor.RemovableMedia = descriptorB[10] > 0;
|
descriptor.RemovableMedia = descriptorB[10] > 0;
|
||||||
descriptor.CommandQueueing = descriptorB[11] > 0;
|
descriptor.CommandQueueing = descriptorB[11] > 0;
|
||||||
descriptor.VendorIdOffset = BitConverter.ToUInt32(descriptorB, 12);
|
descriptor.VendorIdOffset = BitConverter.ToInt32(descriptorB, 12);
|
||||||
descriptor.ProductIdOffset = BitConverter.ToUInt32(descriptorB, 16);
|
descriptor.ProductIdOffset = BitConverter.ToInt32(descriptorB, 16);
|
||||||
descriptor.ProductRevisionOffset = BitConverter.ToUInt32(descriptorB, 20);
|
descriptor.ProductRevisionOffset = BitConverter.ToInt32(descriptorB, 20);
|
||||||
descriptor.SerialNumberOffset = BitConverter.ToUInt32(descriptorB, 24);
|
descriptor.SerialNumberOffset = BitConverter.ToInt32(descriptorB, 24);
|
||||||
descriptor.BusType = (Windows.StorageBusType)BitConverter.ToUInt32(descriptorB, 28);
|
descriptor.BusType = (Windows.StorageBusType)BitConverter.ToUInt32(descriptorB, 28);
|
||||||
descriptor.RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32);
|
descriptor.RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32);
|
||||||
descriptor.RawDeviceProperties = new byte[descriptor.RawPropertiesLength];
|
descriptor.RawDeviceProperties = new byte[descriptor.RawPropertiesLength];
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ namespace DiscImageChef.Devices.Windows
|
|||||||
descriptor.DeviceTypeModifier = descriptorB[9];
|
descriptor.DeviceTypeModifier = descriptorB[9];
|
||||||
descriptor.RemovableMedia = BitConverter.ToBoolean(descriptorB, 10);
|
descriptor.RemovableMedia = BitConverter.ToBoolean(descriptorB, 10);
|
||||||
descriptor.CommandQueueing = BitConverter.ToBoolean(descriptorB, 11);
|
descriptor.CommandQueueing = BitConverter.ToBoolean(descriptorB, 11);
|
||||||
descriptor.VendorIdOffset = BitConverter.ToUInt32(descriptorB, 12);
|
descriptor.VendorIdOffset = BitConverter.ToInt32(descriptorB, 12);
|
||||||
descriptor.ProductIdOffset = BitConverter.ToUInt32(descriptorB, 16);
|
descriptor.ProductIdOffset = BitConverter.ToInt32(descriptorB, 16);
|
||||||
descriptor.ProductRevisionOffset = BitConverter.ToUInt32(descriptorB, 20);
|
descriptor.ProductRevisionOffset = BitConverter.ToInt32(descriptorB, 20);
|
||||||
descriptor.SerialNumberOffset = BitConverter.ToUInt32(descriptorB, 24);
|
descriptor.SerialNumberOffset = BitConverter.ToInt32(descriptorB, 24);
|
||||||
descriptor.BusType = (StorageBusType)BitConverter.ToUInt32(descriptorB, 28);
|
descriptor.BusType = (StorageBusType)BitConverter.ToUInt32(descriptorB, 28);
|
||||||
descriptor.RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32);
|
descriptor.RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32);
|
||||||
|
|
||||||
|
|||||||
@@ -166,10 +166,10 @@ namespace DiscImageChef.Devices.Windows
|
|||||||
public byte DeviceTypeModifier;
|
public byte DeviceTypeModifier;
|
||||||
[MarshalAs(UnmanagedType.U1)] public bool RemovableMedia;
|
[MarshalAs(UnmanagedType.U1)] public bool RemovableMedia;
|
||||||
[MarshalAs(UnmanagedType.U1)] public bool CommandQueueing;
|
[MarshalAs(UnmanagedType.U1)] public bool CommandQueueing;
|
||||||
public uint VendorIdOffset;
|
public int VendorIdOffset;
|
||||||
public uint ProductIdOffset;
|
public int ProductIdOffset;
|
||||||
public uint ProductRevisionOffset;
|
public int ProductRevisionOffset;
|
||||||
public uint SerialNumberOffset;
|
public int SerialNumberOffset;
|
||||||
public StorageBusType BusType;
|
public StorageBusType BusType;
|
||||||
public uint RawPropertiesLength;
|
public uint RawPropertiesLength;
|
||||||
public byte[] RawDeviceProperties;
|
public byte[] RawDeviceProperties;
|
||||||
|
|||||||
Reference in New Issue
Block a user