Skip to content

Commit

Permalink
correctly increment signal path index
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Dec 16, 2023
1 parent 81d9057 commit b2792c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ open class OcaBlock<ActionObject: OcaRoot>: OcaWorker {
public var signalPaths = OcaMap<OcaUint16, OcaSignalPath>()

public func add(signalPath path: OcaSignalPath) async throws -> OcaUint16 {
let index: OcaUint16 = signalPaths.keys.sorted().last ?? 1
let index: OcaUint16 = 1 + (signalPaths.keys.max() ?? 0)
signalPaths[index] = path
return index
}
Expand Down

0 comments on commit b2792c5

Please sign in to comment.