Skip to content

Commit d821eb6

Browse files
jescaladadgl
andauthored
Update src/proxy/processors/push-action/parsePush.ts
Co-authored-by: David Leadbeater <[email protected]>
1 parent 2f4d4bf commit d821eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/proxy/processors/push-action/parsePush.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ const parsePacketLines = (buffer: Buffer): [string[], number] => {
351351

352352
while (offset + 4 <= buffer.length) {
353353
const lengthHex = buffer.toString('utf8', offset, offset + 4);
354-
const length = parseInt(lengthHex, 16);
354+
const length = Number(`0x${lengthHex}`);
355355

356356
// Prevent non-hex characters from causing issues
357357
if (isNaN(length) || length < 0) {

0 commit comments

Comments
 (0)