Out of bounds check fix

This commit is contained in:
Mikael Degerfält 2019-06-26 23:45:15 +02:00
parent faf4f528b3
commit 68d8ac984b

View file

@ -857,7 +857,7 @@ unsigned int multiMap(unsigned short val, const unsigned short * _in, const unsi
// map breath values to selected curve
unsigned int breathCurve(unsigned int inputVal) {
if(curve > ARR_LEN(curves)) return inputVal;
if(curve >= ARR_LEN(curves)) return inputVal;
return multiMap(inputVal, curveIn, curves[curve], 17);
}