The type change is unnecessary.
The crucial change is
data += n;
which is there: github.com/arduino/ArduinoCore-sam/.../USBCore.cpp#L204
The type change is unnecessary.
The crucial change is
data += n;
which is there: github.com/arduino/ArduinoCore-sam/.../USBCore.cpp#L204