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

Undefined elements returned from enumerateValues #208

Open
trew opened this issue Feb 8, 2021 · 0 comments
Open

Undefined elements returned from enumerateValues #208

trew opened this issue Feb 8, 2021 · 0 comments

Comments

@trew
Copy link

trew commented Feb 8, 2021

https://github.com/desktop/registry-js/blob/master/src/main.cc#L109
This line allocates an array of fixed size, which is then populated with values on these lines:
https://github.com/desktop/registry-js/blob/master/src/main.cc#L133:L149

Only REG_SZ, REG_EXPAND_SZ and REG_DWORD is supported.

If an unsupported value is enumerated, this produces an array in typescript that could end up looking like this:

[{ ... REG_DWORD value }, undefined, { ...REG_SZ value }]

The typings does not reflect that undefined is a possibility. Either the typings should change, or the array returned from the EnumerateValues function should not return empty values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant