Fix reading OCR from newer versions of Linux sysfs.

This commit is contained in:
2020-06-05 23:30:17 +01:00
parent a95c17ff83
commit d746f87a16

View File

@@ -918,6 +918,10 @@ namespace Aaru.Devices
{
var sr = new StreamReader(file);
string ins = sr.ReadToEnd().Trim();
if(ins.StartsWith("0x", StringComparison.InvariantCultureIgnoreCase))
ins = ins.Substring(2);
outBuf = new byte[ins.Length / 2];
int count = 0;