Misery42
Misery42
I dont understand it too... i struggle with segmentation fault!
**JS** ``` var sRes = addon.helloWorld("hello", "world"); console.log(`helloWorld returned: ${sRes}`); ``` **C Code:** ``` napi_value hello_world (napi_env env, napi_callback_info info) { size_t argc = 2; napi_value args[2]; napi_get_cb_info(env, info, &argc,...
Note! `str_size = str_size + 1;` `["w", "o", "r", "l", "d", "NULL"]` In this case str_size is 5! But when you want to fill the buffer you need a size...