From 9d907da292ba78d50b6c8d7ed96b262713f8120d Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Thu, 17 Jul 2025 11:09:40 +0800 Subject: [PATCH] convert resource number to int Signed-off-by: lanhaoyu --- interfaces/kits/ani/common/common_fun_ani.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/kits/ani/common/common_fun_ani.cpp b/interfaces/kits/ani/common/common_fun_ani.cpp index ad73c625d9..e161e89a97 100644 --- a/interfaces/kits/ani/common/common_fun_ani.cpp +++ b/interfaces/kits/ani/common/common_fun_ani.cpp @@ -1152,8 +1152,8 @@ ani_object CommonFunAni::ConvertResource(ani_env* env, const Resource& resource) RETURN_NULL_IF_FALSE(StringToAniStr(env, resource.moduleName, string)); RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); - // id: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ID, static_cast(resource.id))); + // id: long + RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ID, resource.id)); return object; } -- Gitee