We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ef9bad commit b957e0bCopy full SHA for b957e0b
src/device.cpp
@@ -249,10 +249,10 @@ uint8_t Device::getDeviceAddress() const {
249
}
250
251
std::vector<uint8_t> *Device::getPortNumbers() {
252
- uint8_t ports[Usbpp::Device::MAX_PORT_NUMBERS]; // these are not chars, actually uints- these are port numbers (or something similar)
253
std::vector<uint8_t> *ports_vec = new std::vector<uint8_t>();
254
255
if (pimpl->m_device != NULL) {
+ uint8_t ports[Usbpp::Device::MAX_PORT_NUMBERS];
256
int count = libusb_get_port_numbers(pimpl->m_device, ports, Usbpp::Device::MAX_PORT_NUMBERS);
257
if (count > 0) {
258
ports_vec->reserve(count);
0 commit comments