mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 03:05:18 +02:00
Merge pull request #22189 from hrydgard/debug-input-rewind-overflows
Fix three more out-of-bounds writes (minor)
This commit is contained in:
@@ -683,7 +683,10 @@ void ControlMapper::Axis(const AxisInput *axes, size_t count) {
|
||||
if (deviceIndex < (size_t)DEVICE_ID_COUNT) {
|
||||
deviceTimestamps_[deviceIndex] = now;
|
||||
}
|
||||
rawAxisValue_[axis.axisId] = axis.value; // these are only used for co-axis mapping
|
||||
// Same as deviceId above, axisId comes straight from the device and can be out of range.
|
||||
if ((size_t)axis.axisId < JOYSTICK_AXIS_MAX) {
|
||||
rawAxisValue_[axis.axisId] = axis.value; // these are only used for co-axis mapping
|
||||
}
|
||||
if (axis.value >= 0.0f) {
|
||||
InputMapping mapping(axis.deviceId, axis.axisId, 1);
|
||||
InputMapping opposite(axis.deviceId, axis.axisId, -1);
|
||||
|
||||
Reference in New Issue
Block a user