Skip to content

Commit 303ccd6

Browse files
committed
apc_modbus: Fix log message register range
Signed-off-by: Axel Gembe <axel@gembe.net>
1 parent 05727d1 commit 303ccd6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/apc_modbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ static int _apc_modbus_setvar(const char *nut_varname, const char *str_value)
13271327
addr = apc_value->modbus_addr;
13281328
nb = apc_value->modbus_len;
13291329
if (modbus_write_registers(modbus_ctx, addr, nb, reg_value) < 0) {
1330-
upslogx(LOG_ERR, "%s: Write of %d:%d failed: %s (%s)", __func__, addr, addr + nb, modbus_strerror(errno), device_path);
1330+
upslogx(LOG_ERR, "%s: Write of %d:%d failed: %s (%s)", __func__, addr, addr + nb - 1, modbus_strerror(errno), device_path);
13311331
_apc_modbus_handle_error(modbus_ctx);
13321332
return STAT_SET_FAILED;
13331333
}

0 commit comments

Comments
 (0)