|
From: Dan S. <dds...@us...> - 2007-07-17 18:43:34
|
Update of /cvsroot/javax-usb/javax-usb/src/javax/usb/util In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6250 Modified Files: StandardRequest.java Log Message: defect 1610873 : getDescriptor does not work with index>127 change short wValue = (short)((type << 8) | index); to short wValue = (short)((type << 8) | ((int)index)&0xff); Index: StandardRequest.java =================================================================== RCS file: /cvsroot/javax-usb/javax-usb/src/javax/usb/util/StandardRequest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StandardRequest.java 23 Mar 2004 01:03:47 -0000 1.7 --- StandardRequest.java 17 Jul 2007 18:43:22 -0000 1.8 *************** *** 281,285 **** byte bmRequestType = REQUESTTYPE_GET_DESCRIPTOR; byte bRequest = UsbConst.REQUEST_GET_DESCRIPTOR; ! short wValue = (short)((type << 8) | index); short wIndex = langid; --- 281,285 ---- byte bmRequestType = REQUESTTYPE_GET_DESCRIPTOR; byte bRequest = UsbConst.REQUEST_GET_DESCRIPTOR; ! short wValue = (short)((type << 8) | ((int)index)&0xff); short wIndex = langid; |