From 4bdc59cd17d3c3dc81b2e94e74ab636e8b4a3fbd Mon Sep 17 00:00:00 2001 From: SUE Date: Tue, 15 Feb 2022 03:33:30 +0000 Subject: [PATCH] Signed-off-by:hellohyh001 --- interfaces/plugin/src/sensor_napi_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/plugin/src/sensor_napi_utils.cpp b/interfaces/plugin/src/sensor_napi_utils.cpp index fad2220d..bc60458e 100644 --- a/interfaces/plugin/src/sensor_napi_utils.cpp +++ b/interfaces/plugin/src/sensor_napi_utils.cpp @@ -273,7 +273,7 @@ void ConvertToSensorData(napi_env env, AsyncCallbackInfo *asyncCallbackInfo, nap napi_get_undefined(env, &result[0]); int32_t sensorTypeId = asyncCallbackInfo->data.sensorData.sensorTypeId; if ((g_sensorAttributeList.count(sensorTypeId)) == 0 || (g_sensorAttributeList[sensorTypeId].size() - != (asyncCallbackInfo->data.sensorData.dataLength / sizeof(float)))) { + > (asyncCallbackInfo->data.sensorData.dataLength / sizeof(float)))) { HiLog::Error(LABEL, "%{public}s count of sensorTypeId is zero", __func__); return; } -- Gitee