Skip to content

Extensions ReadIntHoldingRegisters crashes when using it on 16 bit devices #38

Description

@henrikstromberg

I Use this simulator to test https://sourceforge.net/projects/modrssim/

WordSize = 16;
Endian = Endian.LittleEndian;

when I Call m_ExtendeModbusMaster.ReadIntHoldingRegisters(1, 10, 1);
It crashes.
I have debugges the code and when using WordSize = 16 it only reads 1 register but I think it should read two registers and the result of that should be the converted to a Int32. The function ConvertRegistersToValues now returns a byte array of size 2 and teh function ByteValueArraysToInts will now crash with error Destination array is not long enough to copy all the items in the collection. Check array index and length.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions