diff --git a/asn1-parser.js b/asn1-parser.js index e001e88..198c85a 100644 --- a/asn1-parser.js +++ b/asn1-parser.js @@ -67,6 +67,7 @@ ASN1.parse = function parseAsn1Helper(buf) { iters += 1; depth.length += 1; child = parseAsn1(buf.slice(index, index + adjustedLen), depth); + depth.length -= 1; // The numbers don't match up exactly and I don't remember why... // probably something with adjustedLen or some such, but the tests pass index += (2 + child.lengthSize + child.length); diff --git a/package.json b/package.json index 3c9cdf8..aaa69ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "asn1-parser", - "version": "1.1.5", + "version": "1.1.6", "description": "An ASN.1 parser in less than 100 lines of Vanilla JavaScript, part of the Bluecrypt suite.", "homepage": "https://git.coolaj86.com/coolaj86/asn1-parser.js", "main": "asn1-parser.js",