-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When constructing ModbusResponse from rawCRC data, field _address is left uninitialized.
It's understandable to not fill this field as there is no information about it in the frame, BUT as it is uninitialised, it contains pure gibberish, So accessing it with .registerAddress() is undefined behaviour.
I think the value should be initialized to some invalid value (-1/0xFFFF ?) and .registerAddress should throw if someone tries to access it.
david-drinn
Metadata
Metadata
Assignees
Labels
No labels