mafintosh / mafintosh/a-napi-example

Redundant reference

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
47
Forks
5
PR merge metrics
No merged PRs in 30d

Description

```
char str[1024];
size_t str_len;

if (napi_get_value_string_utf8(env, argv[0], (char *) &str, 1024, &str_len) != napi_ok) {
```
Are you sure you need `&` before str here?
Seems like you send char** instead of char*.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Find the source file containing the shown napi_get_value_string_utf8 call and inspect the API signature and surrounding declarations. Confirm whether the cast changes the argument type, then verify the call compiles and that the string and length outputs still behave as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, node.js
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.