Commit a2c27d39cfd8a24ecf324668097ce89661ffff83

Ozkan Sezer 2021-11-13T17:56:28

SDL_hidapi_switch.c (ConstructSubcommand): lose use of '&' on rumbleData SwitchCommonOutputPacket_t->rumbleData is an array.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 9341d1d..51c44ef 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -418,7 +418,7 @@ static void ConstructSubcommand(SDL_DriverSwitch_Context *ctx, ESwitchSubcommand
     outPacket->commonData.ucPacketType = k_eSwitchOutputReportIDs_RumbleAndSubcommand;
     outPacket->commonData.ucPacketNumber = ctx->m_nCommandNumber;
 
-    SDL_memcpy(&outPacket->commonData.rumbleData, &ctx->m_RumblePacket.rumbleData, sizeof(ctx->m_RumblePacket.rumbleData));
+    SDL_memcpy(outPacket->commonData.rumbleData, ctx->m_RumblePacket.rumbleData, sizeof(ctx->m_RumblePacket.rumbleData));
 
     outPacket->ucSubcommandID = ucCommandID;
     SDL_memcpy(outPacket->rgucSubcommandData, pBuf, ucLen);