Fixed Pipe_IsEndpointBound() function not taking the endpoint's direction into account.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / CDC.c
index 85864b0..227ab94 100644 (file)
@@ -182,7 +182,8 @@ static uint8_t DComp_CDC_Host_NextCDCInterfaceEndpoint(void* const CurrentDescri
        \r
                uint8_t EndpointType = (CurrentEndpoint->Attributes & EP_TYPE_MASK);\r
        \r
-               if ((EndpointType == EP_TYPE_BULK) || (EndpointType == EP_TYPE_INTERRUPT))\r
+               if (((EndpointType == EP_TYPE_BULK) || (EndpointType == EP_TYPE_INTERRUPT)) &&\r
+                   !(Pipe_IsEndpointBound(CurrentEndpoint->EndpointAddress)))\r
                {\r
                        return DESCRIPTOR_SEARCH_Found;\r
                }\r