From 68d8ac984b13bc1d1d035ba480006ed81afb9fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Degerf=C3=A4lt?= Date: Wed, 26 Jun 2019 23:45:15 +0200 Subject: [PATCH] Out of bounds check fix --- NuEVI/NuEVI.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuEVI/NuEVI.ino b/NuEVI/NuEVI.ino index 4f7cf5c..0b772b3 100644 --- a/NuEVI/NuEVI.ino +++ b/NuEVI/NuEVI.ino @@ -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); }