From 19ee4826691dedeff168a165fc177321d2987021 Mon Sep 17 00:00:00 2001 From: Adam Dimitry Enzo Ambrosino <52578762+A-D-E-A@users.noreply.github.com> Date: Wed, 21 May 2025 10:09:35 +0200 Subject: [PATCH] remove impossible check removes the impossible "if (lenB === null)" check, since it is impossible for it to be null because of the "& 0xff" on the previous line. --- lib/ber/reader.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ber/reader.js b/lib/ber/reader.js index 8a7e4ca..6a6bf43 100644 --- a/lib/ber/reader.js +++ b/lib/ber/reader.js @@ -90,8 +90,6 @@ Reader.prototype.readLength = function (offset) { return null; var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; if ((lenB & 0x80) === 0x80) { lenB &= 0x7f;