The default case in windows_transfer_callback() calls windows_error_str(0)
which will convert the error code returned by GetLastError() to a string.
This currently works because windows_transfer_callback() is either called
with io_result set to NO_ERROR or io_result set to GetLastError().
If windows_transfer_callback() will ever be called with io_result set
differently then the default case might report the wrong error message.
Call windows_error_str(io_result) instead to avoid this.
Closes #151
}
break;
default:
- usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error %d: %s", io_result, windows_error_str(0));
+ usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error %d: %s", io_result, windows_error_str(io_result));
status = LIBUSB_TRANSFER_ERROR;
break;
}
-#define LIBUSB_NANO 10844
+#define LIBUSB_NANO 10845