stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.4k stars 1.73k forks source link

Minor fix on error output #214

Closed oldfaber closed 10 years ago

oldfaber commented 10 years ago

Hi, In modbus.c at line 1534 if (read_nb > MODBUS_MAX_READ_REGISTERS) { if (ctx->debug) { fprintf(stderr, "ERROR Too many registers requested (%d > %d)\n", read_nb, MODBUS_MAX_WR_READ_REGISTERS); <== HERE }

I think this sould be MODBUS_MAX_READ_REGISTERS.

Regards Fabio

stephane commented 10 years ago

Already fixed in master: https://github.com/stephane/libmodbus/blob/master/src/modbus.c#L1524 Thank you for the report.