When parsing an Illinois barcode that uses the 2003 AAMVA spec, I get an ArgumentOutOfRangeException thrown by the GetSubfileRecords.
Running through it manually, it attempts to parse the offset as Substring(23, 4) which results in "2901", this is incorrect, it seems it needs to be shifted left 2 characters to return "0029", with this offset it parses correctly.
|
offset = Convert.ToInt32(input.Substring(23, 4)); |
I replaced the above with the following
var offsetStart = (idCard.IssuerIdentificationNumber == IssuerIdentificationNumber.Illinois) ? 21 : 23;
offset = Convert.ToInt32(input.Substring(offsetStart, 4));
And it seems to parse correctly now.
When parsing an Illinois barcode that uses the 2003 AAMVA spec, I get an ArgumentOutOfRangeException thrown by the GetSubfileRecords.
Running through it manually, it attempts to parse the offset as Substring(23, 4) which results in "2901", this is incorrect, it seems it needs to be shifted left 2 characters to return "0029", with this offset it parses correctly.
IdParser/IdParser/Barcode.cs
Line 202 in 1002a17
I replaced the above with the following
And it seems to parse correctly now.