bloguetronica / cp2130-qt

A C++ class that uses libusb to interface with CP2130 devices. It can be used to configure the OTP ROM of such devices, as well as to control them. The class was made for Qt. If you wish to use a derived non-Qt version, please refer to https://github.com/bloguetronica/cp2130.
0 stars 0 forks source link

The variable "bytesToRead" should be converted to an int when passed to bulkTransfer() on line 856 #20

Closed samuelfmlourenco closed 2 years ago

samuelfmlourenco commented 2 years ago

Since bytesToRead is a quint32 and not an int, it should be converted before being passed as an argument of bulkTransfer(). Therefore, line 856 should be rewritten:

bulkTransfer(endpointInAddr, readInputBuffer, static_cast<int>(bytesToRead), &bytesRead, errcnt, errstr);

samuelfmlourenco commented 2 years ago

Bug fixed in version 2.2.0.