From ecd6edbd5fedc1624ebd977299c200d83ce709a1 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sat, 25 May 2019 11:14:46 +0200 Subject: [PATCH] Aie --- radio/src/gvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/gvars.cpp b/radio/src/gvars.cpp index 0975f617a..4a56d8b70 100644 --- a/radio/src/gvars.cpp +++ b/radio/src/gvars.cpp @@ -48,7 +48,7 @@ int16_t getGVarValue(int8_t gv, int8_t fm) int32_t getGVarValuePrec1(int8_t gv, int8_t fm) { - int8_t idx = (gv >= 0 ? gv : -idx - 1); + int8_t idx = (gv >= 0 ? gv : -gv - 1); int8_t mul = (g_model.gvars[idx].prec == 0 ? 10 : 1); // explicit cast to `int` needed, othervise gv is promoted to double! if (gv < 0) { mul = -mul;