Update byte skipping logic and improve clarity in MeshCoreConnector and ChannelMessage

This commit is contained in:
Winston Lowe
2026-03-23 08:14:46 -07:00
parent 767dc1164e
commit 630606acdc
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -129,11 +129,11 @@ class ChannelMessage {
if (code == respCodeChannelMsgRecvV3) {
reader.skipBytes(1); // Skip SNR
final flags = reader.readByte();
final hasPath = (flags & 0x01) != 0;
reader.skipBytes(1); // Skip reserved byte
channelIdx = reader.readByte();
pathLen = reader.readByte();
txtType = reader.readByte();
final hasPath = (flags & 0x01) != 0;
if (hasPath && pathLen > 0) {
reader.rewind(); // Rewind to read path length again for pathBytes
pathBytes = reader.readBytes(pathLen);