From 16b95a5415cc5077bb113996a20789d7cf4ddf71 Mon Sep 17 00:00:00 2001 From: Massimo Callegari Date: Tue, 26 Nov 2024 18:57:15 +0100 Subject: [PATCH] engine: fix loop on DMX address check --- ui/src/addfixture.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/addfixture.cpp b/ui/src/addfixture.cpp index 6d1e311f58..01bb48c9cb 100644 --- a/ui/src/addfixture.cpp +++ b/ui/src/addfixture.cpp @@ -408,7 +408,13 @@ quint32 AddFixture::findAddress(quint32 universe, quint32 numChannels, continue; for (quint32 ch = 0; ch < fxi->channels(); ch++) - map[(fxi->universeAddress() & 0x01FF) + ch] = 1; + { + quint32 addr = (fxi->universeAddress() & 0x01FF) + ch; + if (addr > 511) + continue; + + map[addr] = 1; + } } /* Try to find the next contiguous free address space */