Skip to content

Commit

Permalink
snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Oct 4, 2023
1 parent f53c863 commit 8cdb7e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/test/common-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ inline void add_last_status(napi_env env,
NODE_API_CALL_RETURN_VOID(
env, napi_get_and_clear_last_exception(env, &exception));
char exception_key[50];
#if !defined(__wasm__) || (defined(__EMSCRIPTEN__) || defined(__wasi__))
snprintf(exception_key, sizeof(exception_key), "%s%s", key, "Exception");
#endif
NODE_API_CALL_RETURN_VOID(
env,
napi_set_named_property(env, return_value, exception_key, exception));
Expand Down

0 comments on commit 8cdb7e9

Please sign in to comment.