Skip to content

Commit 8f3969f

Browse files
committed
Solve minor bug with node port when defining size of files to be loaded.
1 parent 6e54bd8 commit 8f3969f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/ports/node_port/source/node_port.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ napi_value metacall_node_call(napi_env env, napi_callback_info info)
768768
return result;
769769
}
770770

771-
// this function is the handler of the "metacall_load_from_file"
772771
napi_value metacall_node_load_from_file(napi_env env, napi_callback_info info)
773772
{
774773
const size_t args_size = 2;
@@ -794,7 +793,7 @@ napi_value metacall_node_load_from_file(napi_env env, napi_callback_info info)
794793
strncpy((char *)file_name_strings[i], c_strings, _result + 1);
795794
}
796795
if(_result == 0) return NULL;
797-
int met_result = metacall_load_from_file(tagBuf, file_name_strings, sizeof(file_name_strings)/sizeof(file_name_strings[0]), NULL);
796+
int met_result = metacall_load_from_file(tagBuf, file_name_strings, length_of_JS_array, NULL);
798797
if (met_result > 0)
799798
{
800799
napi_throw_error(env, NULL, "MetaCall could not load from file");

0 commit comments

Comments
 (0)