SDL: Fixed error: array subscript 2 is above array bounds of ‘const Uint8[2]’ (62e70)

From 62e7049a4f6eedc75d7ffb9cffc435f491f1577c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 18 Sep 2023 12:19:18 -0700
Subject: [PATCH] =?UTF-8?q?Fixed=20error:=20array=20subscript=202=20is=20a?=
 =?UTF-8?q?bove=20array=20bounds=20of=20=E2=80=98const=20Uint8[2]=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Smart compilers don't like dereferencing off the end of arrays

(cherry picked from commit f6756047a4190d9c82222e4ec378bdb14a72f8d7)
---
 src/joystick/hidapi/SDL_hidapi_ps5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/hidapi/SDL_hidapi_ps5.c b/src/joystick/hidapi/SDL_hidapi_ps5.c
index 48b6b99f6a62..e671b8aac79e 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps5.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps5.c
@@ -102,7 +102,7 @@ typedef struct
     Uint8 rgucAccelX[2];          /* 21 */
     Uint8 rgucAccelY[2];          /* 23 */
     Uint8 rgucAccelZ[2];          /* 25 */
-    Uint8 rgucSensorTimestamp[2]; /* 27 - 16/32 bit little endian */
+    Uint8 rgucSensorTimestamp[4]; /* 27 - 16/32 bit little endian */
 
 } PS5StatePacketCommon_t;