-
Notifications
You must be signed in to change notification settings - Fork 46
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
Æsthetic improvements and two fixes #27
Conversation
UNICODE IS THE FUTURE
Since we're always on Windows anyway. (The 's' is for SAFETY.)
And remove an unused value.
If there's a test harness that's easy enough to setup and run from tasks in EDIT: moving this to #28 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Just a tweak to the code comments in the other places where we're formatting errors.
src/main.cc
Outdated
@@ -130,8 +129,9 @@ v8::Local<v8::Array> EnumerateValues(HKEY hCurrentKey, Isolate *isolate) { | |||
else | |||
{ | |||
char errorMessage[50]; // 39 for message + 10 for int + 1 for null |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/main.cc
Outdated
@@ -183,7 +183,7 @@ NAN_METHOD(ReadValues) | |||
else | |||
{ | |||
char errorMessage[46]; // 35 for message + 10 for int + 1 for null |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Fixes: #26, also returns once we hit an error in the loop instead of continuing.
(Mostly) stylistic changes:
sprintf
→sprintf_s
DWORD
extraction code (this needs review – is it possible to store non-DWORD data in DWORD entries like you can shove anything into REG_SZ?)nullptr
TCHAR
and its ilkNeeded: