Skip to content

Commit cdfa2af

Browse files
committed
Fix index out of range.
1 parent 812c94a commit cdfa2af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dmr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ void DSDDMR::processSlotTypePDU()
993993

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

996-
if (dataType > DMR_TYPES_COUNT)
996+
if (dataType >= DMR_TYPES_COUNT)
997997
{
998998
m_dataType = DSDDMRDataReserved;
999999
memcpy(&m_slotText[4], "RES", 3);

0 commit comments

Comments
 (0)