Use index from end expression.

This commit is contained in:
2020-04-22 00:22:33 +01:00
parent fe4e055fbc
commit e4c32b05ee

View File

@@ -1054,7 +1054,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
if(bytes.Length % 2 != 0)
{
byte[] tmp = new byte[bytes.Length + 1];
tmp[tmp.Length - 1] = 0x20;
tmp[^1] = 0x20;
Array.Copy(bytes, 0, tmp, 0, bytes.Length);
bytes = tmp;
}