From 6e292106e3d4d39bbce3bae73776bdaddcb0a107 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sat, 23 Jun 2018 22:28:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20SSN=20file=20reader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/readSsnFile.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ssn/readSsnFile.ts b/src/ssn/readSsnFile.ts index 7d36aeb..92ba6e2 100644 --- a/src/ssn/readSsnFile.ts +++ b/src/ssn/readSsnFile.ts @@ -122,6 +122,7 @@ export default function readSsnFile(buffer: ArrayBuffer): ISsnFileEntry[] { throw new Error(`Password is too long, it should be 120 characters at most but it is ${fieldLength} characters long.`); } encodedPassword = new Uint8Array(buffer, pos, fieldLength); + pos += fieldLength; break; } case 0x80AE: //diff type @@ -137,8 +138,8 @@ export default function readSsnFile(buffer: ArrayBuffer): ISsnFileEntry[] { break; default: //unknown field, ignore it + pos += fieldLength; } - pos += fieldLength; } pos += fileCommentLength;