From 1094de355758f2bf36d47cfd49327eab61041e3d Mon Sep 17 00:00:00 2001 From: Aang23 Date: Thu, 4 Jan 2024 20:02:55 +0100 Subject: [PATCH] Fix a VERY stupid bug --- src-core/common/codings/rotation.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src-core/common/codings/rotation.cpp b/src-core/common/codings/rotation.cpp index 3194ca458..3f2addca9 100644 --- a/src-core/common/codings/rotation.cpp +++ b/src-core/common/codings/rotation.cpp @@ -5,6 +5,11 @@ void rotate_soft(int8_t *soft, int size, phase_t phase, bool iqswap) { int8_t tmp; + // Scale down to avoid overflows + for (int i = 0; i < size; i++) + if (soft[i] == -128) + soft[i] = -127; + // Swap I & Q if requested if (iqswap) {