Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Apr 9, 2022
1 parent 677fcde commit 3474a27
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"files.associations": {
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__functional_base": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__nullptr": "cpp",
"__split_buffer": "cpp",
"__string": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"algorithm": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"exception": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"random": "cpp",
"ratio": "cpp",
"semaphore": "cpp",
"set": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"vector": "cpp",
"*.tcc": "cpp",
"memory_resource": "cpp",
"stop_token": "cpp",
"__memory": "cpp"
}
}
4 changes: 3 additions & 1 deletion binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ struct Slice {
NAPI_STATUS_THROWS_VOID(napi_get_value_string_utf8(env, from, NULL, 0, &size));
store_.resize(size, '\0');
size_t copied = 0;
NAPI_STATUS_THROWS_VOID(napi_get_value_string_utf8(env, from, &store_[0], store_.length() + 1, &copied));
const auto status = napi_get_value_string_utf8(env, from, &store_[0], store_.length() + 1, &copied);
store_.resize(copied);
NAPI_STATUS_THROWS_VOID(status);
assert(copied == size);
} else if (IsBuffer(env, from)) {
char* data = nullptr;
Expand Down

0 comments on commit 3474a27

Please sign in to comment.