Skip to content

Commit

Permalink
Solve minor bug with node port when defining size of files to be loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Mar 21, 2020
1 parent 6e54bd8 commit 8f3969f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/ports/node_port/source/node_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ napi_value metacall_node_call(napi_env env, napi_callback_info info)
return result;
}

// this function is the handler of the "metacall_load_from_file"
napi_value metacall_node_load_from_file(napi_env env, napi_callback_info info)
{
const size_t args_size = 2;
Expand All @@ -794,7 +793,7 @@ napi_value metacall_node_load_from_file(napi_env env, napi_callback_info info)
strncpy((char *)file_name_strings[i], c_strings, _result + 1);
}
if(_result == 0) return NULL;
int met_result = metacall_load_from_file(tagBuf, file_name_strings, sizeof(file_name_strings)/sizeof(file_name_strings[0]), NULL);
int met_result = metacall_load_from_file(tagBuf, file_name_strings, length_of_JS_array, NULL);
if (met_result > 0)
{
napi_throw_error(env, NULL, "MetaCall could not load from file");
Expand Down

0 comments on commit 8f3969f

Please sign in to comment.