mirror of
https://github.com/openharmony/global_resmgr_standard.git
synced 2026-07-01 03:22:20 -04:00
Merge pull request !155 from jacklee0906/master
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user