校正参数校验问题

Signed-off-by: zheng_zhi_hao <zhengzhihao3@huawei.com>
This commit is contained in:
zheng_zhi_hao 2024-11-19 23:16:01 +08:00
parent 473c82b39e
commit 55390e23fa

View File

@ -761,8 +761,8 @@ napi_value NapiInnerPrint::NotifyPrintServiceEvent(napi_env env, napi_callback_i
napi_valuetype valuetype;
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ZERO], &valuetype), napi_invalid_arg);
PRINT_CALL_BASE(env, napi_typeof(env, argv[NapiPrintUtils::INDEX_ONE], &valuetype), napi_invalid_arg);
std::string jobId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZERO]);
uint32_t event = NapiPrintUtils::GetUint32FromValue(env, argv[NapiPrintUtils::INDEX_ONE]);
uint32_t event = NapiPrintUtils::GetUint32FromValue(env, argv[NapiPrintUtils::INDEX_ZERO]);
std::string jobId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ONE]);
PRINT_HILOGI("jobId: %{public}s, event : %{public}d", jobId.c_str(), event);
if (!IsValidApplicationEvent(event)) {
PRINT_HILOGE("invalid event");