Skip to content

Commit

Permalink
engine: fix loop on DMX address check
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Nov 26, 2024
1 parent 483f139 commit 16b95a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/src/addfixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 16b95a5

Please sign in to comment.