-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
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.
Line 202 in 1002a17
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels