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;