From c349ac3a5d6aeba94e75875328346d1417dd6957 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 25 May 2024 10:38:32 +0200 Subject: [PATCH] Skip the temporary variable when calling `#findStreamLength` (PR 18125 follow-up) --- src/core/parser.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/parser.js b/src/core/parser.js index a9b826f40..c40f36a82 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -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();