X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/4421782b7fb49e160b1c18f2295e6cd1f0b00c04..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c index a2a0c3bd5..6948296a5 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c @@ -1,6 +1,9 @@ uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length) { - uint8_t* DataStream = (uint8_t*)(Buffer + TEMPLATE_BUFFER_OFFSET(Length)); + uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); + + if (!(Length)) + Endpoint_ClearOUT(); while (Length) {