From 4cfcbf71ad069defd00812c6c05e432d82faf75b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 5 Dec 2023 21:04:29 +0800 Subject: [PATCH] valid msg --- include/common/tmsg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index a60f03ff0f..d842a75bf7 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -66,7 +66,8 @@ typedef uint16_t tmsg_t; static inline bool tmsgIsValid(tmsg_t type) { int8_t maxSegIdx = TMSG_SEG_CODE(TDMT_MAX_MSG); - int segIdx = TMSG_SEG_CODE(type); + + int segIdx = TMSG_SEG_CODE(type); if (segIdx >= 0 && segIdx < maxSegIdx) { return type < tMsgRangeDict[segIdx]; }