From 25297ed4d982dbc5659f5855ffca9252f1f4b509 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 25 Nov 2021 01:10:34 +0100 Subject: [PATCH] Fixed data-regex --- src/streamHandler/PacketStreamFactory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streamHandler/PacketStreamFactory.js b/src/streamHandler/PacketStreamFactory.js index 8113677..ee66562 100644 --- a/src/streamHandler/PacketStreamFactory.js +++ b/src/streamHandler/PacketStreamFactory.js @@ -114,7 +114,7 @@ class PacketStreamFactory extends Transform{ data = data.join(''); // Get payload-Hex-Data. If there is no data: empty - packet.payloadData = hexConv.hexToBytes(data.match(/(?<=\s)([A-F0-9]{1,4}(?!(\.|x)))/igm)?.join('') ?? ''); + packet.payloadData = hexConv.hexToBytes(data.match(/(?<=\s)([A-F0-9]{1,4}(?=\s))/igm)?.join('') ?? ''); // Cover special cases with more data let newPacket;