Skip to content

Commit

Permalink
Fix index out of range.
Browse files Browse the repository at this point in the history
  • Loading branch information
srcejon committed Nov 29, 2023
1 parent 812c94a commit cdfa2af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dmr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ void DSDDMR::processSlotTypePDU()

unsigned int dataType = (slotTypeBits[4] << 3) + (slotTypeBits[5] << 2) + (slotTypeBits[6] << 1) + slotTypeBits[7];

if (dataType > DMR_TYPES_COUNT)
if (dataType >= DMR_TYPES_COUNT)
{
m_dataType = DSDDMRDataReserved;
memcpy(&m_slotText[4], "RES", 3);
Expand Down

0 comments on commit cdfa2af

Please sign in to comment.