diff --git a/receipt_utility.ts b/receipt_utility.ts index f9ac867..31b8eee 100644 --- a/receipt_utility.ts +++ b/receipt_utility.ts @@ -24,7 +24,7 @@ export class ReceiptUtility { const oldResult = prevGetVblenFunction(s, idx) // Round up to the remaining length in the string, measured in bytes (2 hex values per byte) if (oldResult === 0 && c === '80') { - return (s.length - idx) / 2 + return (s.length - ASN1HEX.getVidx(s, idx)) / 2 } return oldResult }