🚑 Fix SSN file reader

This commit is contained in:
C-3PO 2018-06-23 22:28:26 +02:00
parent a48956f504
commit 6e292106e3
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -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.`); 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); encodedPassword = new Uint8Array(buffer, pos, fieldLength);
pos += fieldLength;
break; break;
} }
case 0x80AE: //diff type case 0x80AE: //diff type
@ -137,8 +138,8 @@ export default function readSsnFile(buffer: ArrayBuffer): ISsnFileEntry[] {
break; break;
default: default:
//unknown field, ignore it //unknown field, ignore it
pos += fieldLength;
} }
pos += fieldLength;
} }
pos += fileCommentLength; pos += fileCommentLength;