Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #43: libusb.diff

File libusb.diff, 970 bytes (added by Hannibal, 2 years ago)

Patch against 1.0.8

  • libusb/descriptor.c

    diff -ruN libusb-1.0.8/libusb/descriptor.c libusb-1.0.8-new/libusb/descriptor.c
    old new  
    681681        /* Asking for the zero'th index is special - it returns a string 
    682682         * descriptor that contains all the language IDs supported by the device. 
    683683         * Typically there aren't many - often only one. The language IDs are 16 
    684          * bit numbers, and they start at the third byte in the descriptor. See 
    685          * USB 2.0 specification section 9.6.7 for more information. */ 
     684         * bit numbers, and they start at the third byte in the descriptor. This 
     685         * also make useless fetch zero index by this function. See USB 2.0 
     686         * specification section 9.6.7 for more information. */ 
     687 
     688        if (desc_index == 0) 
     689                return LIBUSB_ERROR_INVALID_PARAM; 
     690 
    686691        r = libusb_get_string_descriptor(dev, 0, 0, tbuf, sizeof(tbuf)); 
    687692        if (r < 0) 
    688693                return r;