From 99af6f75b2e0c374148f2e8e878c59f582ac458c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=91=AB?= Date: Thu, 10 Jul 2025 20:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周鑫 --- interfaces/kits/js/src/mod_fs/properties/ani/listfile_ani.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/kits/js/src/mod_fs/properties/ani/listfile_ani.cpp b/interfaces/kits/js/src/mod_fs/properties/ani/listfile_ani.cpp index 43527ee47..6b65ec5ce 100644 --- a/interfaces/kits/js/src/mod_fs/properties/ani/listfile_ani.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/ani/listfile_ani.cpp @@ -114,10 +114,10 @@ tuple>> ParseArrayString(ani_env *env, ani_object } auto getterDesc = BuiltInTypes::Array::getterDesc.c_str(); auto getterSig = BuiltInTypes::Array::objectGetterSig.c_str(); - for (int i = 0; i < int(length); i++) { + for (int idx = 0; idx < int(length); idx++) { ani_ref stringEntryRef; if (ANI_OK != env->Object_CallMethodByName_Ref( - static_cast(resultRef), getterDesc, getterSig, &stringEntryRef, (ani_int)i)) { + static_cast(resultRef), getterDesc, getterSig, &stringEntryRef, (ani_int)idx)) { return { false, nullopt }; } auto [succ, tmp] = TypeConverter::ToUTF8String(env, static_cast(stringEntryRef)); -- Gitee