From c705c8f89c875b2f54e2a4c853c654be2a5f57fb Mon Sep 17 00:00:00 2001 From: stefanbode Date: Wed, 17 Jan 2024 10:03:42 +0100 Subject: [PATCH] Fixed DIV/0 (#20524) --- tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index 06e5e8a3e..0a617123c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -687,7 +687,7 @@ void ShutterInit(void) Shutter[i].min_realPositionChange = 0; break; case SHT_COUNTER: - Shutter[i].min_realPositionChange = SHT_DIV_ROUND(Shutter[i].min_realPositionChange, Shutter[i].motordelay); + Shutter[i].min_realPositionChange = SHT_DIV_ROUND(Shutter[i].min_realPositionChange, Shutter[i].motordelay > 0?Shutter[i].motordelay : 1); break; }