mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix decoding of USB or FireWire serial numbers with control characters.
This commit is contained in:
@@ -902,7 +902,7 @@ namespace Aaru.Devices
|
||||
Serial = UsbSerialString;
|
||||
else
|
||||
foreach(char c in Serial.Where(c => !char.IsControl(c)))
|
||||
Serial = $"{(uint)c:X2}";
|
||||
Serial = $"{Serial}{(uint)c:X2}";
|
||||
}
|
||||
|
||||
if(IsFireWire)
|
||||
@@ -917,7 +917,7 @@ namespace Aaru.Devices
|
||||
Serial = $"{_firewireGuid:X16}";
|
||||
else
|
||||
foreach(char c in Serial.Where(c => !char.IsControl(c)))
|
||||
Serial = $"{(uint)c:X2}";
|
||||
Serial = $"{Serial}{(uint)c:X2}";
|
||||
}
|
||||
|
||||
// Some optical drives are not getting the correct serial, and IDENTIFY PACKET DEVICE is blocked without
|
||||
|
||||
Reference in New Issue
Block a user