-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
If you use:
uint32_t ui32 = cm.readBinArg();
Then readBinArg() or readBin() will read 4 Bytes from the receiving buffer, ignoring the real length of what is sent and any seperator that may come earlier.
If you send (with ID=1):
1,ABCD;
(with A=0x41, B=0x42, C=0x43, D=0x44) you will get as expected:
0x44434241 = 1145258561.
But if you send:
1,A;
you don't get 0x41 = 65, instead you will get a random value with 0x41 as LSB, 0x00 after it and 2 more "random" bytes from memory.
And ArgOk is not updated.
This should be enhanced with a test if the length (that slpit_r() sees) is big enough, but for this some more changes are needed.
Metadata
Metadata
Assignees
Labels
No labels