|
@@ -961,7 +961,7 @@ int modbus_reply(modbus_t *ctx, const uint8_t *req,
|
|
|
nb_write, nb, MODBUS_MAX_WR_WRITE_REGISTERS, MODBUS_MAX_WR_READ_REGISTERS);
|
|
|
} else if (mapping_address < 0 ||
|
|
|
(mapping_address + nb) > mb_mapping->nb_registers ||
|
|
|
- mapping_address < 0 ||
|
|
|
+ mapping_address_write < 0 ||
|
|
|
(mapping_address_write + nb_write) > mb_mapping->nb_registers) {
|
|
|
rsp_length = response_exception(
|
|
|
ctx, &sft, MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS, rsp, FALSE,
|