fix error in rpt process

This commit is contained in:
lnk
2025-07-28 17:27:19 +08:00
parent 29e5f17141
commit 46b7603ed0
2 changed files with 4 additions and 4 deletions

View File

@@ -1200,11 +1200,11 @@ ST_VOID u_iec_rpt_ind_data_by_devtype(MVL_VAR_ASSOC** info_va,
//lnk 20250624匹配不同的实时控制块
const char* extractAfterUrCb(const char* rptID) {
if (!rptID) return NULL;
if (!rptID) return "N/A";
// 查找 "urcb"(区分大小写)
const char* pos = strstr(rptID, "urcb");
if (!pos) return rptID; // 如果没有 urcb,就退而求其次返回整个字符串
if (!pos) return "N/A"; // 如果没有 urcb
return pos + 4; // 返回 "urcb" 后面的部分指针
}