HID: zeroize buffers before getting a report, use std::array

This commit is contained in:
Megamouse 2022-06-05 14:35:58 +02:00
parent f57da6655c
commit 4912202cfa
3 changed files with 12 additions and 7 deletions

View file

@ -424,6 +424,7 @@ bool dualsense_pad_handler::get_calibration_data(DualSenseDevice* dualsense_devi
{
for (int tries = 0; tries < 3; ++tries)
{
buf = {};
buf[0] = 0x05;
if (int res = hid_get_feature_report(dualsense_device->hidDevice, buf.data(), DUALSENSE_CALIBRATION_REPORT_SIZE); res <= 0)