Skip to content

Commit 0bfeec6

Browse files
committed
Update checksum bytes for Unicore hash parsing: 8 bytes default, 2 for MODE messages
1 parent 95d6687 commit 0bfeec6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Parse_Unicore_Hash.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ bool sempUnicoreHashFindFirstComma(SEMP_PARSE_STATE *parse, uint8_t data)
315315
scratchPad->unicoreHash.sentenceName[scratchPad->unicoreHash.sentenceNameLength++] = 0;
316316

317317
// Determine the number of checksum bytes
318-
scratchPad->unicoreHash.checksumBytes = 2;
319-
if (strstr("VERSION", (const char *)scratchPad->unicoreHash.sentenceName))
320-
scratchPad->unicoreHash.checksumBytes = 8;
318+
scratchPad->unicoreHash.checksumBytes = 8;
319+
if (strstr((const char *)scratchPad->unicoreHash.sentenceName, "MODE") != NULL)
320+
scratchPad->unicoreHash.checksumBytes = 2;
321321
parse->state = sempUnicoreHashFindAsterisk;
322322
}
323323
return true;

0 commit comments

Comments
 (0)