Skip to content

Commit 176f4d1

Browse files
committed
Validate new priorities count instead of DMX max
1 parent 5b8d7cb commit 176f4d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/sACNKit/Merger/sACNMerger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public class sACNMerger {
201201
guard let source = sources[sourceId] else { throw sACNMergerError.noSourceWithIdentifier(sourceId) }
202202

203203
// priorities count must be valid and there must be priorities
204-
guard newPrioritiesCount > 0 && newPrioritiesCount <= DMX.addressCount && newPriorities.count == DMX.addressCount else { throw sACNMergerError.invalidLevelCount }
204+
guard newPrioritiesCount > 0 && newPrioritiesCount <= DMX.addressCount && newPriorities.count == newPrioritiesCount else { throw sACNMergerError.invalidLevelCount }
205205

206206
let oldPerAddressPrioritiesCount = source.perAddressPriorityCount
207207
source.perAddressPriorityCount = newPrioritiesCount

0 commit comments

Comments
 (0)