Skip to content

Commit 092e5b1

Browse files
committed
Make received byte counter constant
1 parent c1d0cfe commit 092e5b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/XInput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ int XInputGamepad::receive() {
346346

347347
// Grab packet and store it in rx array
348348
uint8_t rx[8];
349-
int bytesRecv = XInputUSB::recv(rx, sizeof(rx));
349+
const int bytesRecv = XInputUSB::recv(rx, sizeof(rx));
350350

351351
// Only process if received 3 or more bytes (min valid packet size)
352352
if (bytesRecv >= 3) {

0 commit comments

Comments
 (0)