CoapPacket

- Fixed bug in `fromBytes(ubyte[])` whereby we would parse the delta 0-12 option value correctly in the 0-12 length case but would never jump over it idx-wise
- This effectively left us on the starting byte of the option value for the next round, instead of starting on the next `(option delta | option length)`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-09-21 16:25:26 +02:00
parent e4ba2dd0da
commit f85b33a5b1

View File

@ -382,6 +382,9 @@ public class CoapPacket
ubyte[] optionValue = data[idx..idx+optLen];
writeln("Option value: ", optionValue);
// Jump over the option value
idx+=optLen;
// Create the option and add it to the list of options
CoapOption option;
option.value = optionValue;