Merge pull request !155 from jacklee0906/master
This commit is contained in:
openharmony_ci
2022-05-24 03:30:54 +00:00
committed by Gitee
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ ResLocale *ResLocale::DoParse(const char *str, char sep, RState &rState)
{
uint16_t nextType = LANG_TYPE;
const char *nextPos = str;
const char *curPos = nextPos;
const char *curPos = nullptr;
ParseResult r;
while (nextPos) {
if (nextType == END_TYPE) {
@@ -228,6 +228,10 @@ int ResourceManagerAddon::GetResId(napi_env env, size_t argc, napi_value *argv)
napi_valuetype valuetype;
napi_status status = napi_typeof(env, argv[0], &valuetype);
if (status != napi_ok) {
HiLog::Error(LABEL, "Failed to get value type");
return 0;
}
if (valuetype != napi_number) {
HiLog::Error(LABEL, "Invalid param, not number");
return 0;