thegecko/webusb

Strange endpoint number calculation...

qazwsxedcrfvtg14 opened this issue · 0 comments

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?