Alter rewrite ranges so they appear correctly in tracing

This commit is contained in:
Tony Corbett G0WFV
2017-06-07 10:38:53 +01:00
parent 7cd557de8a
commit 2d670d330b
3 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ CRewritePC::CRewritePC(const char* name, unsigned int fromSlot, unsigned int fro
m_name(name),
m_fromSlot(fromSlot),
m_fromIdStart(fromId),
m_fromIdEnd(fromId + range),
m_fromIdEnd(fromId + range - 1U),
m_toSlot(toSlot),
m_toIdStart(toId),
m_trace(trace),
@@ -70,7 +70,7 @@ bool CRewritePC::process(CDMRData& data)
unsigned int dstId = data.getDstId();
unsigned int slotNo = data.getSlotNo();
if (flco != FLCO_USER_USER || slotNo != m_fromSlot || dstId < m_fromIdStart || dstId >= m_fromIdEnd)
if (flco != FLCO_USER_USER || slotNo != m_fromSlot || dstId < m_fromIdStart || dstId > m_fromIdEnd)
return false;
if (m_fromSlot != m_toSlot)