Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Napi handle scope mismatch #17161

Closed
Prev Previous commit
Next Next commit
src: fixing the size of error_messages to last_error+1
  • Loading branch information
neta committed Nov 20, 2017
commit 0301123b3cf9b53635b9805132d4e1b12e7bea9e
2 changes: 1 addition & 1 deletion src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ napi_status napi_get_last_error_info(napi_env env,
// We don't have a napi_status_last as this would result in an ABI
// change each time a message was added.
static_assert(
node::arraysize(error_messages) == napi_handle_scope_mismatch,
node::arraysize(error_messages) == napi_handle_scope_mismatch + 1,
"Count of error messages must match count of error values");
CHECK_LE(env->last_error.error_code, napi_handle_scope_mismatch);

Expand Down