1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Skip the temporary variable when calling #findStreamLength (PR 18125 follow-up)

This commit is contained in:
Jonas Jenwald 2024-05-25 10:38:32 +02:00
parent 17e09e5478
commit c349ac3a5d

View file

@ -710,11 +710,10 @@ class Parser {
this.shift(); // 'stream'
} else {
// Bad stream length, scanning for endstream command.
const actualLength = this.#findStreamLength(startPos);
if (actualLength < 0) {
length = this.#findStreamLength(startPos);
if (length < 0) {
throw new FormatError("Missing endstream command.");
}
length = actualLength;
lexer.nextChar();
this.shift();