thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

Strange endpoint number calculation... #29

Closed qazwsxedcrfvtg14 closed 5 years ago

qazwsxedcrfvtg14 commented 5 years ago

At line 513 in src/adapter.ts const address = endpointNumber & (direction === "in" ? LIBUSB_ENDPOINT_IN : LIBUSB_ENDPOINT_OUT); I don`t understand why use "&"(and) here... Should this be "|"(or) operator?