From c693e892d0cdfdef59b7cd2e4ad01a0823562751 Mon Sep 17 00:00:00 2001 From: Drath Date: Tue, 21 Jul 2026 22:48:46 +0200 Subject: [PATCH] some wack overflow bug? --- src/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aio.c b/src/aio.c index 9569a0c..18e4e72 100644 --- a/src/aio.c +++ b/src/aio.c @@ -243,7 +243,7 @@ void aio_update(struct aio_t *aio) { case BALANCED: if (fan_duty > 65) aio->pump_counter++; - else if (fan_duty < 35) + else if (fan_duty < 35 && aio->pump_counter > 0) aio->pump_counter--; if (aio->pump_counter > 120) @@ -253,7 +253,7 @@ void aio_update(struct aio_t *aio) { break; case EXTREME: - if (fan_duty < 60) + if (fan_duty < 60 && aio->pump_counter > 0) aio->pump_counter--; if (aio->pump_counter < 60)