From d330686798590f4dd06e9a5abfad84a63e680357 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 16 Jul 2026 17:23:32 +0200 Subject: [PATCH] test: Remove superfluous null byte from ps3_hid_report_descriptor Remove a superfluous null byte at the end of ps3_hid_report_descriptor, as it might confuse some more stricter parser. The data in ps3_hid_report_descriptor probably comes for a libinput recording, and sometimes those can have superfluous null byte at the end. This is mentioned for example in the hidreport project: https://github.com/hidutils/hidreport/blob/64d40674038e8bb5e76c4191f5561ec1928c3c72/tools/libinput-recording-extract-hid-descriptor.py#L25-L27 As a proof that the original HID report descriptor of the actual device is 148 bytes long, the following lsusb capture can be compared: http://ps3.jim.sh/sixaxis/usb/lsusb.txt Signed-off-by: Antonio Ospite --- test/testevdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testevdev.c b/test/testevdev.c index 7c98d823dd..d7fad4f32e 100644 --- a/test/testevdev.c +++ b/test/testevdev.c @@ -194,9 +194,9 @@ static unsigned char ps3_hid_report_descriptor[] = 0xc0, 0xa1, 0x02, 0x85, 0xee, 0x75, 0x08, 0x95, 0x30, 0x09, 0x01, 0xb1, 0x02, 0xc0, 0xa1, 0x02, 0x85, 0xef, 0x75, 0x08, 0x95, 0x30, 0x09, 0x01, - 0xb1, 0x02, 0xc0, 0xc0, 0x00, + 0xb1, 0x02, 0xc0, 0xc0, }; -SDL_COMPILE_TIME_ASSERT (ps3, sizeof (ps3_hid_report_descriptor) == 149); +SDL_COMPILE_TIME_ASSERT (ps3, sizeof (ps3_hid_report_descriptor) == 148); /* Same for Steam Deck LCD (jupiter) and OLED (galileo) */ static unsigned char steam_deck_mouse_hid_report_descriptor[] =