From 0ad1529f3fec0d734f84eeaf78d0c25b02e8aaca Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 24 Nov 2021 16:15:27 -0500 Subject: [PATCH] Retain delegate bit length for non-self-clocked data. --- Components/Serial/Line.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Components/Serial/Line.cpp b/Components/Serial/Line.cpp index f7bb06288..9619881e5 100644 --- a/Components/Serial/Line.cpp +++ b/Components/Serial/Line.cpp @@ -130,7 +130,8 @@ bool Line::read() const { template void Line::set_read_delegate(ReadDelegate *delegate, Storage::Time bit_length) { read_delegate_ = delegate; - if constexpr (include_clock) { + if constexpr (!include_clock) { + assert(bit_length > Storage::Time(0)); read_delegate_bit_length_ = bit_length; read_delegate_bit_length_.simplify(); write_cycles_since_delegate_call_ = 0;